Makefile 580 Bytes
Newer Older
Ashley Whetter's avatar
Ashley Whetter committed
1
CC=arm-none-eabi-gcc
2

3 4
FLAGS += -T libopencm3_stm32f4.ld
FLAGS += -D STM32F4
5
FLAGS += -g -fno-common -save-temps
6 7 8 9
FLAGS += -mcpu=cortex-m4 -mthumb
FLAGS += -mfloat-abi=hard -mfpu=fpv4-sp-d16

SRC += energy_monitor.c
10

11 12
HOST_SRC = host/host_receiver.o host/libusbinterface.o host/dataprocessor.o host/helper.o

13 14
.PHONY: firmware hostapp all

15
all: energy_monitor host_receiver
16

17 18
energy_monitor: energy_monitor.c Makefile
	$(CC) $(FLAGS) $(SRC) -o energy_monitor -lopencm3_stm32f4
19

20 21 22
host_receiver:
	cd host; ./configure
	$(MAKE) -C host
23 24

clean:
25 26
	$(MAKE) -C host clean
	rm -f energy_monitor