imuboard/mk: use linker script
[fpv.git] / imuboard / Makefile
1 TARGET = main
2
3 AVERSIVE_DIR ?= ../..
4
5 #GPS_VENUS=1
6 GPS_UBX=1
7
8 # List C source files here. (C dependencies are automatically generated.)
9 SRC = $(TARGET).c
10 SRC += commands.c
11 SRC += commands_gen.c
12 SRC += cmdline.c
13 SRC += eeprom_config.c
14 SRC += i2cm_sw.c
15 SRC += imu.c
16 SRC += mpu6050.c
17 SRC += MadgwickAHRS.c
18 SRC += byteordering.c
19 SRC += fat.c
20 SRC += sd_main.c
21 SRC += partition.c
22 SRC += sd_raw.c
23 SRC += gps.c
24 ifeq ($(GPS_VENUS), 1)
25 SRC += gps_venus.c
26 CFLAGS += -DGPS_VENUS
27 endif
28 ifeq ($(GPS_UBX), 1)
29 SRC += gps_ubx.c
30 CFLAGS += -DGPS_UBX
31 endif
32 SRC += sd_log.c
33 SRC += i2c_protocol.c
34
35
36 CFLAGS += -W -Wall -Werror
37 ifneq ($(H),1)
38 LDFLAGS = -T ../common/avr51.x
39 endif
40
41 ########################################
42
43 -include .aversive_conf
44 include $(AVERSIVE_DIR)/mk/aversive_project.mk
45
46 program_noerase: $(TARGET).$(FORMAT_EXTENSION) $(TARGET).eep
47         echo $(AVRDUDE) -D -V $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH) $(AVRDUDE_WRITE_EEPROM) ;\
48         $(AVRDUDE) -D -V $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH) $(AVRDUDE_WRITE_EEPROM) ;\