Subversion Repositories FlightCtrl

Rev

Rev 1031 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1031 Rev 1034
Line 35... Line 35...
35
 
35
 
36
ifeq ($(F_CPU), 20000000)
36
ifeq ($(F_CPU), 20000000)
37
 QUARZ = 20MHZ
37
 QUARZ = 20MHZ
Line -... Line 38...
-
 
38
endif
-
 
39
 
Line 38... Line 40...
38
endif
40
#OutDir
39
 
41
OUT = ./out
Line 40... Line 42...
40
 
42
 
Line 81... Line 83...
81
# (Note: 3 is not always the best optimization level. See avr-libc FAQ.)
83
# (Note: 3 is not always the best optimization level. See avr-libc FAQ.)
82
OPT = s
84
OPT = s
Line 83... Line 85...
83
 
85
 
84
##########################################################################################################
86
##########################################################################################################
85
# List C source files here. (C dependencies are automatically generated.)
87
# List C source files here. (C dependencies are automatically generated.)
86
SRC = main.c uart.c  printf_P.c timer0.c  analog.c menu.c 
88
SRC = src/main.c src/uart.c  src/printf_P.c src/timer0.c  src/analog.c src/menu.c 
87
SRC += twimaster.c rc.c fc.c GPS.c spi.c led.c
-
 
88
 
89
SRC += src/twimaster.c src/rc.c src/fc.c src/GPS.c src/spi.c src/led.c
Line 89... Line 90...
89
##########################################################################################################
90
##########################################################################################################
90
 
91
 
Line 223... Line 224...
223
# Programming support using avrdude.
224
# Programming support using avrdude.
224
AVRDUDE = avrdude
225
AVRDUDE = avrdude
Line 225... Line 226...
225
 
226
 
226
REMOVE = rm -f
227
REMOVE = rm -f
-
 
228
COPY = cp
Line 227... Line 229...
227
COPY = cp
229
MOVE = mv
228
 
230
 
Line 229... Line 231...
229
HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
231
HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
Line 244... Line 246...
244
MSG_SYMBOL_TABLE = Creating Symbol Table:
246
MSG_SYMBOL_TABLE = Creating Symbol Table:
245
MSG_LINKING = Linking:
247
MSG_LINKING = Linking:
246
MSG_COMPILING = Compiling:
248
MSG_COMPILING = Compiling:
247
MSG_ASSEMBLING = Assembling:
249
MSG_ASSEMBLING = Assembling:
248
MSG_CLEANING = Cleaning project:
250
MSG_CLEANING = Cleaning project:
249
 
-
 
-
 
251
MSG_MOVE = Moving Files:
Line 250... Line 252...
250
 
252
 
251
# Define all object files.
253
# Define all object files.
Line 252... Line 254...
252
OBJ = $(SRC:.c=.o) $(ASRC:.S=.o) 
254
OBJ = $(SRC:.c=.o) $(ASRC:.S=.o) 
Line 261... Line 263...
261
ALL_ASFLAGS = -mmcu=$(MCU) -I. -x assembler-with-cpp $(ASFLAGS)
263
ALL_ASFLAGS = -mmcu=$(MCU) -I. -x assembler-with-cpp $(ASFLAGS)
Line 262... Line 264...
262
 
264
 
263
 
265
 
264
# Default target.
266
# Default target.
Line 265... Line 267...
265
all: begin gccversion sizebefore $(TARGET).elf $(TARGET).hex $(TARGET).eep \
267
all: begin gccversion sizebefore $(TARGET).elf $(TARGET).hex $(TARGET).eep \
266
	$(TARGET).lss $(TARGET).sym sizeafter finished end
268
	$(TARGET).lss $(TARGET).sym sizeafter tooutdir finished end
267
 
269
 
Line 387... Line 389...
387
clean: begin clean_list finished end
389
clean: begin clean_list finished end
Line 388... Line 390...
388
 
390
 
389
clean_list :
391
clean_list :
390
	@echo
392
	@echo
-
 
393
	@echo $(MSG_CLEANING)
391
	@echo $(MSG_CLEANING)
394
	$(REMOVE) out/*.*
392
	$(REMOVE) $(TARGET).hex
395
	#$(REMOVE) $(TARGET).hex
393
	$(REMOVE) $(TARGET).eep
396
	#$(REMOVE) $(TARGET).eep
394
	$(REMOVE) $(TARGET).obj
397
	#$(REMOVE) $(TARGET).obj
395
	$(REMOVE) $(TARGET).cof
398
	#$(REMOVE) $(TARGET).cof
396
	$(REMOVE) $(TARGET).elf
399
	#$(REMOVE) $(TARGET).elf
397
	$(REMOVE) $(TARGET).map
400
	#$(REMOVE) $(TARGET).map
398
	$(REMOVE) $(TARGET).obj
401
	#$(REMOVE) $(TARGET).obj
399
	$(REMOVE) $(TARGET).a90
402
	#$(REMOVE) $(TARGET).a90
400
	$(REMOVE) $(TARGET).sym
403
	#$(REMOVE) $(TARGET).sym
401
	$(REMOVE) $(TARGET).lnk
404
	#$(REMOVE) $(TARGET).lnk
402
	$(REMOVE) $(TARGET).lss
405
	#$(REMOVE) $(TARGET).lss
403
	$(REMOVE) $(OBJ)
406
	#$(REMOVE) $(OBJ)
404
	$(REMOVE) $(LST)
407
	#$(REMOVE) $(LST)
405
	$(REMOVE) $(SRC:.c=.s)
408
	#$(REMOVE) $(SRC:.c=.s)
406
	$(REMOVE) $(SRC:.c=.d)
409
	#$(REMOVE) $(SRC:.c=.d)
-
 
410
 
-
 
411
tooutdir:
-
 
412
	@echo
-
 
413
	@echo $(MSG_MOVE)
-
 
414
	-$(MOVE) $(TARGET).hex $(OUT)
-
 
415
	-$(MOVE) $(TARGET).eep $(OUT)
-
 
416
	#-$(MOVE) $(TARGET).obj $(OUT)
-
 
417
	#-$(MOVE) $(TARGET).cof $(OUT)
-
 
418
	-$(MOVE) $(TARGET).elf $(OUT)
-
 
419
	-$(MOVE) $(TARGET).map $(OUT)
-
 
420
	#-$(MOVE) $(TARGET).a90 $(OUT)
-
 
421
	-$(MOVE) $(TARGET).sym $(OUT)
-
 
422
	#-$(MOVE) $(TARGET).lnk $(OUT)
-
 
423
	-$(MOVE) $(TARGET).lss $(OUT)
-
 
424
	-$(MOVE) $(OBJ) $(OUT)
-
 
425
	-$(MOVE) $(LST) $(OUT)
-
 
426
	#-$(MOVE) $(SRC:.c=.s) $(OUT)
Line 407... Line 427...
407
 
427
	-$(MOVE) $(SRC:.c=.d) $(OUT)
408
 
428
 
409
# Automatically generate C source code dependencies. 
429
# Automatically generate C source code dependencies. 
410
# (Code originally taken from the GNU make user manual and modified 
430
# (Code originally taken from the GNU make user manual and modified