Makefile 1.2 KB
Newer Older
1
include build.mk
Jeroen Vreeken's avatar
Jeroen Vreeken committed
2

3
4
5
6
7
8
9
10
11
CFLAGS= -Wall -O3 \
	-I. \
	-Icontroller \
	-I../common/utils \
	-I../common/trace \
	-I../common/include \
	-Idt_azimuth -Idt_elevation -Iec -Ishell -Ilog
LDFLAGS= -lpthread -lrt -lm -ldl -Wl,-E
CFLAGS_SIM=-DUSE_AZ_SIM -DUSE_EL_SIM
Jeroen Vreeken's avatar
Jeroen Vreeken committed
12

13
14
15
16
17
18
19
20
21
ARCHIVES= \
	dt_azimuth/dt_azimuth.a \
	dt_elevation/dt_elevation.a \
	controller/controller.a \
	log/log.a \
	ec/ec.a \
	shell/shell.a \
	../common/trace/trace.a \
	../common/utils/utils.a
Jeroen Vreeken's avatar
Jeroen Vreeken committed
22

23
24
dt_ctrl_sim_LDFLAGS=`controller/block_list.sh dt_azimuth/dt_azimuth.a dt_elevation/dt_elevation.a controller/controller.a`
dt_ctrl_LDFLAGS=$(dt_ctrl_sim_LDFLAGS) `controller/block_list.sh ec/ec.a`
Jeroen Vreeken's avatar
Jeroen Vreeken committed
25

26
all: console htdocs/console_version.js
Jeroen Vreeken's avatar
Jeroen Vreeken committed
27

28
htdocs/console_version.js: 
29
	@echo "document.write('CAMRAS Console <a target="_blank" href=\"https://eris.camras.nl/redmine/projects/console/repository/revisions/` git rev-parse HEAD`\">built at `date \"+%F %R %Z\"` by ${USER} on `hostname -f`</a>');" > $@
30
31
32
%.a:
	@echo " SUBDIR: $(@D)"
	@$(MAKE) -C $(@D)
Jeroen Vreeken's avatar
Jeroen Vreeken committed
33
34
35



36
37
38
39
winrotor-usb:
	@echo " SUBDIR: $@"
	@$(MAKE) -C winrotor-usb
	
Jeroen Vreeken's avatar
Jeroen Vreeken committed
40

41
42
43
console:
	@echo " SUBDIR: $@"
	@$(MAKE) -C console
Jeroen Vreeken's avatar
Jeroen Vreeken committed
44

45
.PHONY: console htdocs/console_version.js
Jeroen Vreeken's avatar
Jeroen Vreeken committed
46
47
48

clean:
	rm -f *.o *.d
49
50
	$(MAKE) -C console clean
	$(MAKE) -C winrotor-usb clean