Subversion Repositories Projects

Rev

Rev 346 | Rev 389 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 346 Rev 349
Line 11... Line 11...
11
## Options common to compile, link and assembly rules
11
## Options common to compile, link and assembly rules
12
COMMON = -mmcu=$(MCU)
12
COMMON = -mmcu=$(MCU)
Line 13... Line 13...
13
 
13
 
14
## Compile options common for all C compilation units.
14
## Compile options common for all C compilation units.
15
CFLAGS = $(COMMON)
15
CFLAGS = $(COMMON)
16
CFLAGS += -Wall -gdwarf-2 -std=gnu99        -DF_CPU=16000000UL -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums
16
CFLAGS += -Wall -gdwarf-2 -std=gnu99        -DF_CPU=16000000UL -O2 -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums
Line 17... Line 17...
17
CFLAGS += -MD -MP -MT $(*F).o -MF dep/$(@F).d
17
CFLAGS += -MD -MP -MT $(*F).o -MF dep/$(@F).d
18
 
18
 
19
## Assembly specific flags
19
## Assembly specific flags
Line 47... Line 47...
47
main.o: ../main.c
47
main.o: ../main.c
48
	$(CC) $(INCLUDES) $(CFLAGS) -c  $<
48
	$(CC) $(INCLUDES) $(CFLAGS) -c  $<
Line 49... Line 49...
49
 
49
 
50
usart1.o: ../usart1.c
50
usart1.o: ../usart1.c
51
	$(CC) $(INCLUDES) $(CFLAGS) -c  $<
51
	$(CC) $(INCLUDES) $(CFLAGS) -c  $<
52
	
52
 
53
max7456_software_spi.o: ../max7456_software_spi.c
53
max7456_software_spi.o: ../max7456_software_spi.c
54
	$(CC) $(INCLUDES) $(CFLAGS) -c  $<
54
	$(CC) $(INCLUDES) $(CFLAGS) -c  $<
55
	
55
 
56
##Link
56
##Link
57
$(TARGET): $(OBJECTS)
57
$(TARGET): $(OBJECTS)
Line 58... Line 58...
58
	 $(CC) $(LDFLAGS) $(OBJECTS) $(LINKONLYOBJECTS) $(LIBDIRS) $(LIBS) -o $(TARGET)
58
	 $(CC) $(LDFLAGS) $(OBJECTS) $(LINKONLYOBJECTS) $(LIBDIRS) $(LIBS) -o $(TARGET)
Line 75... Line 75...
75
clean:
75
clean:
76
	-rm -rf $(OBJECTS) C-OSD.elf dep/* C-OSD.hex C-OSD.eep C-OSD.lss C-OSD.map
76
	-rm -rf $(OBJECTS) C-OSD.elf dep/* C-OSD.hex C-OSD.eep C-OSD.lss C-OSD.map
Line 77... Line 77...
77
 
77
 
78
 
78
 
79
## Other dependencies
79
## Other dependencies