Commit 6aa2c4cf authored by Jeroen Vreeken's avatar Jeroen Vreeken
Browse files

Enable builds in subdirs (+ needed deps)

parent e8d4844e
...@@ -115,8 +115,15 @@ else ...@@ -115,8 +115,15 @@ else
DIR := $(DIR)/$1 DIR := $(DIR)/$1
endif endif
$(DIR)_TMPTARGETS:=$(value TARGETS)
TARGETS:=
include $(DIR)/$1/build.mk include $(DIR)/$1/build.mk
targets_$$(DIR): $$(TARGETS)
TARGETS:= $$($(DIR)_TMPTARGETS) $$(TARGETS)
DIR := $(DIR) DIR := $(DIR)
endef endef
......
all:
@$(MAKE) --no-print-directory -C .. targets_common
all:
@$(MAKE) --no-print-directory -C ../.. targets_common/command
all:
@$(MAKE) --no-print-directory -C ../.. targets_common/log
all:
@$(MAKE) --no-print-directory -C ../.. targets_common/trace
all:
@$(MAKE) --no-print-directory -C ../.. targets_common/utils
all:
@$(MAKE) --no-print-directory -C .. targets_console
include build.mk all:
@$(MAKE) --no-print-directory -C .. targets_controller
CFLAGS= -Wall -O3 \
-I. \
-Icontroller \
-I../common/log \
-I../common/utils \
-I../common/trace \
-I../common/include \
-Idt_azimuth -Idt_elevation -Iec -Ishell
LDFLAGS= -lpthread -lrt -lm -Wl,-E -L../common/lib -L./lib
CFLAGS_SIM=-DUSE_AZ_SIM -DUSE_EL_SIM
OS= $(shell uname -s)
ifneq ($(OS), FreeBSD)
LDFLAGS+= -ldl
endif
all: dt_ctrl \
test \
controller
dt_ctrl: lib/libcontroller.la lib/libblock.la lib/libethercat.la lib/libdt_azimuth.la lib/libdt_elevation.la
lib/libblock.la: lib/libcontroller.la
lib/libethercat.la: lib/libcontroller.la
lib/libdt_azimuth.la: lib/libcontroller.la
lib/libdt_elevation.la: lib/libcontroller.la
dt_ctrl: dt_ctrl.o
test: lib/libcontroller.la lib/libethercat.la lib/libblock.la
@echo " SUBDIR: $@"
@$(MAKE) -C test
lib/libcontroller.la: lib/libshell.la lib
lib/libcontroller.la:
@echo " SUBDIR: $@"
@$(MAKE) -C controller
lib/libblock.la: lib
@echo " SUBDIR: $@"
@$(MAKE) -C block
lib/libdt_azimuth.la: lib
@echo " SUBDIR: $@"
@$(MAKE) -C dt_azimuth
lib/libdt_elevation.la: lib
@echo " SUBDIR: $@"
@$(MAKE) -C dt_elevation
lib/libethercat.la: lib/libshell.la lib
lib/libethercat.la:
@echo " SUBDIR: $@"
@$(MAKE) -C ec
lib/libshell.la: lib
@echo " SUBDIR: $@"
@$(MAKE) -C shell
lib:
@mkdir lib
.PHONY: test
clean:
rm -f *.o *.d *.a *.la *.lo lib/*
rm -f dt_az dt_az_ctrl \
command_shell \
dt_ctrl
$(MAKE) -C controller clean
$(MAKE) -C block clean
$(MAKE) -C dt_azimuth clean
$(MAKE) -C dt_elevation clean
$(MAKE) -C ec clean
$(MAKE) -C test clean
$(MAKE) -C shell clean
all:
@$(MAKE) --no-print-directory -C ../.. targets_controller/block
all:
@$(MAKE) --no-print-directory -C ../../.. targets_controller/block/il2c
all:
@$(MAKE) --no-print-directory -C ../../../.. targets_controller/block/il2c/test
all:
@$(MAKE) --no-print-directory -C ../.. targets_controller/controller
all:
@$(MAKE) --no-print-directory -C ../.. targets_controller/ec
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment