/[osn-commons]/trunk/plibc/lib/Makefile
ViewVC logotype

Contents of /trunk/plibc/lib/Makefile

Parent Directory Parent Directory | Revision Log Revision Log


Revision 47 - (show annotations)
Thu Aug 15 18:10:51 2024 UTC (7 months, 2 weeks ago) by rakinar2
File size: 551 byte(s)
feat: add plibc to the project
1 LIB = libc.a
2 OBJECTS = libuar.o stdio.o malloc.o
3 CFLAGS = -g -Wall -Wextra -Werror -std=c99 -pedantic -O2 -static -nostdlib -nostartfiles -ffreestanding
4 CC = gcc
5 AR = ar
6 RANLIB = ranlib
7 RM = rm -f
8 LDFLAGS = -g -static -nostdlib -nostartfiles -ffreestanding
9
10 all: $(LIB)
11
12 $(LIB): $(OBJECTS)
13 @echo " AR $@"
14 @$(AR) rcs $@ $^
15 @echo " RANLIB $@"
16 @$(RANLIB) $@
17
18 %.o: %.c
19 @echo " CC $@"
20 @$(CC) $(CFLAGS) -c -o $@ $<
21
22 clean:
23 @echo " RM $(LIB)"
24 @$(RM) $(LIB)
25
26 @for file in *.o; do \
27 echo " RM $$file"; \
28 $(RM) $$file; \
29 done

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26