aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authoraqua <aqua@iserlohn-fortress.net>2022-10-29 11:26:44 +0300
committeraqua <aqua@iserlohn-fortress.net>2022-10-29 11:26:44 +0300
commitc4fcc92183c55db868d0d6ae53e6009fb2e53ee5 (patch)
treead5ef50aa07465e11f779c4482e20e6071182e9c /Makefile
parentmakefile: add libk target (diff)
downloadkernel-c4fcc92183c55db868d0d6ae53e6009fb2e53ee5.tar.xz
makefile: add i686/arch.a target
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile26
1 files changed, 12 insertions, 14 deletions
diff --git a/Makefile b/Makefile
index d7caeea..ebc8d64 100644
--- a/Makefile
+++ b/Makefile
@@ -1,14 +1,10 @@
MAKE = make
-TARGET = i686
-include ${TARGET}/toolchain.mk
-
-CCFLAGS += -Ilib -I.
-
-all: libk.a
+ARCH = i686
+include ${ARCH}/toolchain.mk
info:
@echo "this is the all target"
- @echo "TARGET ${TARGET}"
+ @echo "ARCH ${ARCH}"
@echo "BUILD ${BUILD}"
@echo " MAKE ${MAKE}"
@${MAKE} --version | head -n1
@@ -17,12 +13,14 @@ info:
@echo " LD ${LD} ${LDFLAGS}"
@${LD} --version | head -n1
-clean:
- @rm -rf ${libk,OBJS}
+all: lib/libk.a ${ARCH}/arch.a
-.SUFFIXES: .c .o
-.c.o:
- @echo ' CC $^'
- @$(CC) $(CCFLAGS) -c -o $@ $^
+lib/libk.a:
+ ${MAKE} ARCH=${ARCH} -C lib libk.a
+i686/arch.a:
+ ${MAKE} ARCH=${ARCH} -C i686 arch.a
+
+clean:
+ ${MAKE} ARCH=${ARCH} -C lib clean
+ ${MAKE} ARCH=${ARCH} -C ${ARCH} clean
-include lib/targets.mk