From 72e74f2e3203dc9627f13e740e0d88091ff1d149 Mon Sep 17 00:00:00 2001 From: Christian Cunningham Date: Fri, 3 Dec 2021 09:54:50 -0700 Subject: Added Complilation of Subdirectories --- Unix.mk | 11 +++++++---- Win.mk | 11 +++++++---- 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 -- cgit v1.2.1