Parent Directory
|
Revision Log
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 |