initial commit after making...
Stefan Schuermans authored 12 years ago
|
5)
6) include Makefile.conf
7)
8) # WinAVR Sample makefile written by Eric B. Weddington, J�rg Wunsch, et al.
9) # Released to the Public Domain
10) # Please read the make user manual!
11) #
12) # Additional material for this makefile was submitted by:
13) # Tim Henigan
14) # Peter Fleury
15) # Reiner Patommel
16) # Sander Pool
17) # Frederik Rouleau
18) # Markus Pfaff
19) # Stefan Schuermans
20) #
21) # On command line:
22) #
23) # make all = Make software.
24) #
25) # make clean = Clean out built project files.
26) #
27) # make coff = Convert ELF to AVR COFF (for use with AVR Studio 3.x or VMLAB).
28) #
29) # make extcoff = Convert ELF to AVR Extended COFF (for use with AVR Studio
30) # 4.07 or greater).
31) #
32) # make program_fuses = Set the fuse bits of the device, using avrdude. Please
33) # customize the avrdude settings below first!
34) #
35) # make program = Download the hex file to the device, using avrdude. Please
36) # customize the avrdude settings below first!
37) #
38) # make filename.s = Just compile filename.c into the assembler code only
39) #
40) # To rebuild project do "make clean" then "make all".
41) #
42)
43)
44) # MCU name
45) MCU = atmega128
46)
47) # Output format. (can be srec, ihex, binary)
48) FORMAT = ihex
49)
50) # Target file name (without extension).
51) TARGET = main
52)
53) # Optimization level, can be [0, 1, 2, 3, s]. 0 turns off optimization.
54) # (Note: 3 is not always the best optimization level. See avr-libc FAQ.)
55) OPT = s
56)
57)
58) # List C source files here. (C dependencies are automatically generated.)
59) SRC = $(TARGET).c
60)
61) # If there is more than one source file, append them above, or modify and
62) # uncomment the following:
63) SRC += arp.c bus.c cf.c checksum.c config.c dhcp.c eeprom.c \
64) ethernet.c http.c icmp.c ip.c random.c rtl8019.c \
|
initial commit after making...
Stefan Schuermans authored 12 years ago
|
66) xtea.c
67)
68) # You can also wrap lines by appending a backslash to the end of the line:
69) #SRC += baz.c \
70) #xyzzy.c
71)
72)
73)
74) # List Assembler source files here.
75) # Make them always end in a capital .S. Files ending in a lowercase .s
76) # will not be considered source files but generated files (assembler
77) # output from the compiler), and will be deleted upon "make clean"!
78) # Even though the DOS/Win* filesystem matches both .s and .S the same,
79) # it will preserve the spelling of the filenames, and gcc itself does
80) # care about how the name is spelled on its command-line.
81) ASRC = ser62500_asm.S
82)
83)
84) # List any extra directories to look for include files here.
85) # Each directory must be seperated by a space.
86) EXTRAINCDIRS =
87)
88)
89) # Optional compiler flags.
90) # -g: generate debugging information (for GDB, or for COFF conversion)
91) # -O*: optimization level
92) # -f...: tuning, see gcc manual and avr-libc documentation
93) # -Wall...: warning level
94) # -Wa,...: tell GCC to pass this to the assembler.
95) # -ahlms: create assembler listing
96) CFLAGS = -g -O$(OPT) \
97) -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums \
98) -Wall -Wstrict-prototypes \
99) -Wa,-adhlns=$(<:.c=.lst) \
100) $(patsubst %,-I%,$(EXTRAINCDIRS)) \
101) $(DBG_FLAGS)
102)
103)
104) # Set a "language standard" compiler flag.
105) # Unremark just one line below to set the language standard to use.
106) # gnu99 = C99 + GNU extensions. See GCC manual for more information.
107) #CFLAGS += -std=c89
108) #CFLAGS += -std=gnu89
109) #CFLAGS += -std=c99
110) CFLAGS += -std=gnu99
111)
112) # do not use C99 strict aliasing rules
113) # this kills some warnings occuring when casting pointer types
114) CFLAGS += -fno-strict-aliasing
115)
116)
117)
118) # Optional assembler flags.
119) # -Wa,...: tell GCC to pass this to the assembler.
120) # -ahlms: create listing
121) # -gstabs: have the assembler create line number information; note that
122) # for use in COFF files, additional information about filenames
123) # and function names needs to be present in the assembler source
124) # files -- see avr-libc docs [FIXME: not yet described there]
125) ASFLAGS = -Wa,-adhlns=$(<:.S=.lst),-gstabs
126)
127)
128)
129) # Optional linker flags.
130) # -Wl,...: tell GCC to pass this to linker.
131) # -Map: create map file
132) # --cref: add cross reference to map file
133) LDFLAGS = -Wl,-Map=$(TARGET).map,--cref
134)
135)
136)
137) # Additional libraries
138)
139) # Minimalistic printf version
140) #LDFLAGS += -Wl,-u,vfprintf -lprintf_min
141)
142) # Floating point printf version (requires -lm below)
143) #LDFLAGS += -Wl,-u,vfprintf -lprintf_flt
144)
145) # -lm = math library
146) LDFLAGS += -lm
147)
148)
149)
150) # rebuilding is required if one of the following files is changed
151) REBUILD_DEPS = Makefile.conf
152)
153)
154)
155) # Programming support using avrdude. Settings and variables.
156)
157) # Programming hardware: alf avr910 avrisp bascom bsd
158) # dt006 pavr picoweb pony-stk200 sp12 stk200 stk500
159) #
160) # Type: avrdude -c ?
161) # to get a full listing.
162) #
|