initial commit after making...
Stefan Schuermans authored 12 years ago
|
1) # flaneth - flash and ethernet
2) # Copyright (C) 2007-2008 Stefan Schuermans <stefan@schuermans.info>
3) # Copyleft: GNU public license V2 - http://www.gnu.org/copyleft/gpl.html
|
header fix
Stefan Schuermans authored 12 years ago
|
4) # a BlinkenArea project - a BlinkenArea project - http://www.blinkenarea.org/
|
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:
|
put filesystem stuff into o...
Stefan Schuermans authored 12 years ago
|
63) SRC += apps.c \
64) arp.c bus.c cf.c checksum.c config.c dhcp.c dosfs.c dosfs_user.c \
|
added dosfs code to read FA...
Stefan Schuermans authored 12 years ago
|
65) eeprom.c ethernet.c http.c icmp.c ip.c random.c rtl8019.c \
|
converted CF processing to...
Stefan Schuermans authored 12 years ago
|
66) ser62500.c status.c tasks.c tcp.c timing.c uart.c udp.c \
|
initial commit after making...
Stefan Schuermans authored 12 years ago
|
67) xtea.c
68)
69) # You can also wrap lines by appending a backslash to the end of the line:
70) #SRC += baz.c \
71) #xyzzy.c
72)
73)
74)
75) # List Assembler source files here.
76) # Make them always end in a capital .S. Files ending in a lowercase .s
77) # will not be considered source files but generated files (assembler
78) # output from the compiler), and will be deleted upon "make clean"!
79) # Even though the DOS/Win* filesystem matches both .s and .S the same,
80) # it will preserve the spelling of the filenames, and gcc itself does
81) # care about how the name is spelled on its command-line.
82) ASRC = ser62500_asm.S
83)
84)
85) # List any extra directories to look for include files here.
86) # Each directory must be seperated by a space.
87) EXTRAINCDIRS =
88)
89)
90) # Optional compiler flags.
91) # -g: generate debugging information (for GDB, or for COFF conversion)
92) # -O*: optimization level
93) # -f...: tuning, see gcc manual and avr-libc documentation
94) # -Wall...: warning level
95) # -Wa,...: tell GCC to pass this to the assembler.
96) # -ahlms: create assembler listing
97) CFLAGS = -g -O$(OPT) \
98) -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums \
99) -Wall -Wstrict-prototypes \
100) -Wa,-adhlns=$(<:.c=.lst) \
101) $(patsubst %,-I%,$(EXTRAINCDIRS)) \
102) $(DBG_FLAGS)
103)
104)
105) # Set a "language standard" compiler flag.
106) # Unremark just one line below to set the language standard to use.
107) # gnu99 = C99 + GNU extensions. See GCC manual for more information.
108) #CFLAGS += -std=c89
109) #CFLAGS += -std=gnu89
110) #CFLAGS += -std=c99
111) CFLAGS += -std=gnu99
112)
113) # do not use C99 strict aliasing rules
114) # this kills some warnings occuring when casting pointer types
115) CFLAGS += -fno-strict-aliasing
116)
117)
118)
119) # Optional assembler flags.
120) # -Wa,...: tell GCC to pass this to the assembler.
121) # -ahlms: create listing
122) # -gstabs: have the assembler create line number information; note that
123) # for use in COFF files, additional information about filenames
124) # and function names needs to be present in the assembler source
125) # files -- see avr-libc docs [FIXME: not yet described there]
126) ASFLAGS = -Wa,-adhlns=$(<:.S=.lst),-gstabs
127)
128)
129)
130) # Optional linker flags.
131) # -Wl,...: tell GCC to pass this to linker.
132) # -Map: create map file
133) # --cref: add cross reference to map file
134) LDFLAGS = -Wl,-Map=$(TARGET).map,--cref
135)
136)
137)
138) # Additional libraries
139)
140) # Minimalistic printf version
141) #LDFLAGS += -Wl,-u,vfprintf -lprintf_min
142)
143) # Floating point printf version (requires -lm below)
144) #LDFLAGS += -Wl,-u,vfprintf -lprintf_flt
145)
146) # -lm = math library
147) LDFLAGS += -lm
148)
149)
150)
151) # rebuilding is required if one of the following files is changed
152) REBUILD_DEPS = Makefile.conf
153)
154)
155)
156) # Programming support using avrdude. Settings and variables.
157)
158) # Programming hardware: alf avr910 avrisp bascom bsd
159) # dt006 pavr picoweb pony-stk200 sp12 stk200 stk500
160) #
161) # Type: avrdude -c ?
162) # to get a full listing.
163) #
|
converted CF processing to...
Stefan Schuermans authored 12 years ago
|
164) AVRDUDE_PROGRAMMER = stk200
165) #AVRDUDE_PROGRAMMER = avrisp2
|
initial commit after making...
Stefan Schuermans authored 12 years ago
|
166)
167)
168) #AVRDUDE_PORT = com1 # programmer connected to serial device
169) #AVRDUDE_PORT = lpt1 # programmer connected to parallel port
|
converted CF processing to...
Stefan Schuermans authored 12 years ago
|
170) AVRDUDE_PORT = /dev/parport0
171) #AVRDUDE_PORT = usb
|