aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Cunningham <cc@localhost>2021-12-03 09:54:50 -0700
committerChristian Cunningham <cc@localhost>2021-12-03 09:54:50 -0700
commit72e74f2e3203dc9627f13e740e0d88091ff1d149 (patch)
treec3509791bde79aebe77b5350d7b64b1270401cfb
parentbea722ff0d5445d716b26df8eabfda24b6000776 (diff)
Added Complilation of Subdirectories
-rw-r--r--Unix.mk11
-rw-r--r--Win.mk11
2 files changed, 14 insertions, 8 deletions
diff --git a/Unix.mk b/Unix.mk
index 761d406..7a93f12 100644
--- a/Unix.mk
+++ b/Unix.mk
@@ -1,8 +1,8 @@
-C_SOURCES = $(wildcard src/*.c)
-C_HEADERS = $(wildcard src/*.h)
+C_SOURCES = $(wildcard src/*.c src/**/*.c)
+C_HEADERS = $(wildcard src/*.h src/**/*.h)
C_OBJECTS = ${C_SOURCES:.c=.co}
C_OBJECTD = ${subst src,obj,${C_OBJECTS}}
-A_SOURCES = $(wildcard src/*.S)
+A_SOURCES = $(wildcard src/*.S src/**/*.S)
A_OBJECTS = ${A_SOURCES:.S=.ao}
A_OBJECTD = ${subst src,obj,${A_OBJECTS}}
@@ -24,7 +24,7 @@ ifeq ($(BSP),2)
CFLAGS += -DBSP23
endif
-.PHONY: clean run run-debug debug export
+.PHONY: clean run run-debug debug export tree
default: clean build/kernel7.img
@@ -66,3 +66,6 @@ debug: build/kernel-g.elf build/kernel.list
clean:
rm -f obj/*.o build/*.elf build/*.list build/*.img obj/*.ao obj/*.co
+
+tree:
+ @tree -a -I obj\|build\|.git\|.gitignore
diff --git a/Win.mk b/Win.mk
index 0446c22..5986400 100644
--- a/Win.mk
+++ b/Win.mk
@@ -1,8 +1,8 @@
-C_SOURCES = $(wildcard src/*.c)
-C_HEADERS = $(wildcard src/*.h)
+C_SOURCES = $(wildcard src/*.c src/**/*.c)
+C_HEADERS = $(wildcard src/*.h src/**/*.h)
C_OBJECTS = ${C_SOURCES:.c=.co}
C_OBJECTD = ${subst src,obj,${C_OBJECTS}}
-A_SOURCES = $(wildcard src/*.S)
+A_SOURCES = $(wildcard src/*.S src/**/*.S)
A_OBJECTS = ${A_SOURCES:.S=.ao}
A_OBJECTD = ${subst src,obj,${A_OBJECTS}}
@@ -24,7 +24,7 @@ ifeq ($(BSP),2)
CFLAGS += -DBSP23
endif
-.PHONY: clean run run-debug debug export
+.PHONY: clean run run-debug debug export tree
default: clean build/kernel7.img
@@ -66,3 +66,6 @@ debug: build/kernel-g.elf build/kernel.list
clean:
rm -f obj/*.o build/*.elf build/*.list build/*.img obj/*.ao obj/*.co
+
+tree:
+ @tree -a -I obj\|build\|.git\|.gitignore