summaryrefslogtreecommitdiffstats
path: root/Makefile
blob: 705fc8342e6b5b0a80b628fb711f31bf1967b5b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
VALAC=valac
CC=gcc

ACCELEROMETERS := $(wildcard sensors/accelerometers/*.vala)
OBJECTS        := $(patsubst %.vala, %.o, $(SOURCES))

all: microcopterd plugins

microcopterd: actuators/*.vala sensors/*.vala hw/*.vala ctrl/*.vala *.vala
	$(VALAC) -g -o $@ --pkg posix --pkg linux --pkg gmodule-2.0 --pkg readline -X -lreadline -X -lm $^

plugins:
	@cd actuators/motor ; make
	@cd ctrl/models ; make
	@cd receiver ; make
	@cd sensors/accelerometer ; make
	@cd sensors/barometer ; make
	@cd sensors/compass ; make
	@cd sensors/gyroscope ; make

clean:
	rm -f microcopterd
	rm -f *.so */*.so */*/*.so
	rm -f *.c */*.c */*/*.c

.PHONY: clean plugins