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

Contents of /trunk/plibc/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: 702 byte(s)
feat: add plibc to the project
1 ARCH_LIST = x86_64
2 LIB = lib/libc.a
3 BIN = bin-exec
4
5 export AS = as
6 export CC = gcc
7 export CFLAGS = -g -Wall -Wextra -Werror -std=c99 -pedantic -O2 -static -nostdlib -nostartfiles -ffreestanding
8 export LDFLAGS = -g -static -nostdlib -nostartfiles -e _start -ffreestanding
9 export ASFLAGS = -g
10 export RM = rm -f
11
12 all: $(BIN)
13
14 $(BIN): $(ARCH_LIST) lib
15 @echo " CCLD $@"
16 $(CC) $(LDFLAGS) -o $@ $(patsubst %,%/*.o,$(ARCH_LIST)) $(LIB)
17
18 lib:
19 $(MAKE) -C lib
20
21 .PHONY: lib $(ARCH_LIST) $(BIN)
22
23 $(ARCH_LIST):
24 $(MAKE) -C $@
25
26 clean:
27 $(RM) *.o $(patsubst %,%/*.o,$(ARCH_LIST))
28 $(MAKE) -C lib clean
29
30 for dir in $(ARCH_LIST); do \
31 if [ -f $$dir/Makefile ]; then \
32 $(MAKE) -C $$dir clean; \
33 fi; \
34 done

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26