Subversion Repositories HomeAutomation

Rev

Rev 483 | Rev 621 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed

Rev 483 Rev 563
Line 1... Line 1...
1
include bios.inc
1
# Paths: default pathnames if they are not
2
 
-
 
3
# Target file name (without extension).
2
# passed on from parent Makefile.
-
 
3
ifndef TARGET
4
TARGET = main
4
TARGET = main
5
 
5
endif
-
 
6
ifndef LIBDIR
6
LIBDIR = ../../avr-lib
7
LIBDIR = ../../../avr-lib
-
 
8
endif
7
include $(LIBDIR)/system.inc
9
ifndef SRCDIR
-
 
10
SRCDIR = ../src
8
 
11
endif
9
# List C source files here. (C dependencies are automatically generated.)
-
 
10
CSRC =	$(TARGET).c\
12
ifndef BIOSDIR
11
		$(LIBDIR)/drivers/timer/timebase.c\
13
BIOSDIR = ../bios
-
 
14
endif
-
 
15
ifndef CFGDIR
12
		$(LIBDIR)/drivers/mcu/mcu.c\
16
CFGDIR = ..
-
 
17
endif
-
 
18
 
13
		$(LIBDIR)/drivers/sensor/tc1047/tc1047.c\
19
include $(CFGDIR)/bios.inc
14
 
20
 
15
# List Assembler source files here.
21
# VPATH: setup search path for source files.
-
 
22
vpath
16
# Make them always end in a capital .S.  Files ending in a lowercase .s
23
vpath %.c $(LIBDIR):$(SRCDIR)
-
 
24
 
17
# will not be considered source files but generated files (assembler
25
# List source files here. (C dependencies are automatically generated.)
18
# output from the compiler), and will be deleted upon "make clean"!
26
SOURCES =	main.c\
19
# Even though the DOS/Win* filesystem matches both .s and .S the same,
27
                drivers/timer/timebase.c\
20
# it will preserve the spelling of the filenames, and gcc itself does
28
                drivers/mcu/mcu.c\
21
# care about how the name is spelled on its command-line.
29
                drivers/sensor/tc1047/tc1047.c\
22
ASRC = 
-
 
23
 
-
 
24
 
30
 
25
# Optimization level, can be [0, 1, 2, 3, s]. 
31
# Optimization level, can be [0, 1, 2, 3, s]. 
26
# 0 = turn off optimization. s = optimize for size.
32
# 0 = turn off optimization. s = optimize for size.
27
# (Note: 3 is not always the best optimization level. See avr-libc FAQ.)
33
# (Note: 3 is not always the best optimization level. See avr-libc FAQ.)
28
OPT = s
34
OPT = s
29
#OPT = 3
35
#OPT = 3
Line 33... Line 39...
33
# AVR (extended) COFF requires stabs, plus an avr-objcopy run.
39
# AVR (extended) COFF requires stabs, plus an avr-objcopy run.
34
DEBUG = stabs
40
DEBUG = stabs
35
#DEBUG = dwarf-2
41
#DEBUG = dwarf-2
36
 
42
 
37
# List any extra directories to look for include files here.
43
# List any extra directories to look for include files here.
38
#     Each directory must be seperated by a space.
44
# Each directory must be separated by a space.
39
EXTRAINCDIRS = $(LIBDIR)
45
EXTRAINCDIRS = $(LIBDIR) $(BIOSDIR)
40
 
-
 
41
#		$(LIBDIR)/drivers/sensor/tc1047\
-
 
42
#		$(LIBDIR)/funcdefs\
-
 
43
 
46
 
44
# Compiler flag to set the C Standard level.
47
# Compiler flag to set the C Standard level.
45
# c89   - "ANSI" C
48
# c89   - "ANSI" C
46
# gnu89 - c89 plus GCC extensions
49
# gnu89 - c89 plus GCC extensions
47
# c99   - ISO C99 standard (not yet fully implemented)
50
# c99   - ISO C99 standard (not yet fully implemented)
48
# gnu99 - c99 plus GCC extensions
51
# gnu99 - c99 plus GCC extensions
49
CSTANDARD = -std=gnu99
52
CSTANDARD = -std=gnu99
50
 
53
 
51
# Place -D or -U options here
54
# Place -D or -U options here
52
CDEFS =
55
CDEFS =
53
 
56
 
54
# Place -I options here
57
# Place -I options here
55
CINCS =
58
CINCS =
Line 66... Line 69...
66
CFLAGS += -g$(DEBUG)
69
CFLAGS += -g$(DEBUG)
67
CFLAGS += $(CDEFS) $(CINCS)
70
CFLAGS += $(CDEFS) $(CINCS)
68
CFLAGS += -O$(OPT)
71
CFLAGS += -O$(OPT)
69
CFLAGS += -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums
72
CFLAGS += -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums
70
CFLAGS += -Wall -Wstrict-prototypes
73
CFLAGS += -Wall -Wstrict-prototypes
71
CFLAGS += -Wa,-adhlns=$(<:.c=.lst)
74
CFLAGS += -Wa,-adhlns=$(@:.o=.lst)
72
CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))
75
CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))
73
CFLAGS += $(CSTANDARD)
76
CFLAGS += $(CSTANDARD)
-
 
77
CFLAGS += $(GENDEPFLAGS)
74
 
78
 
75
 
79
 
76
 
80
 
77
# Assembler flags.
81
# Assembler flags.
78
#  -Wa,...:   tell GCC to pass this to the assembler.
82
#  -Wa,...:   tell GCC to pass this to the assembler.
Line 81... Line 85...
81
#             for use in COFF files, additional information about filenames
85
#             for use in COFF files, additional information about filenames
82
#             and function names needs to be present in the assembler source
86
#             and function names needs to be present in the assembler source
83
#             files -- see avr-libc docs [FIXME: not yet described there]
87
#             files -- see avr-libc docs [FIXME: not yet described there]
84
##ASFLAGS = -Wa,-adhlns=$(<:.S=.lst),-gstabs 
88
##ASFLAGS = -Wa,-adhlns=$(<:.S=.lst),-gstabs 
85
ASFLAGS = -mmcu=$(MCU) -I. -x assembler-with-cpp
89
ASFLAGS = -mmcu=$(MCU) -I. -x assembler-with-cpp
86
ASFLAGS += -Wa,-adhlns=$(<:.S=.lst),-g$(DEBUG)
90
ASFLAGS += -Wa,-adhlns=$(@:.o=.lst),-g$(DEBUG)
87
 
91
 
88
 
92
 
89
#Additional libraries.
93
#Additional libraries.
90
 
94
 
91
# Minimalistic printf version
95
# Minimalistic printf version
Line 116... Line 120...
116
# only used for heap (malloc()).
120
# only used for heap (malloc()).
117
#EXTMEMOPTS = -Wl,--defsym=__heap_start=0x801100,--defsym=__heap_end=0x80ffff
121
#EXTMEMOPTS = -Wl,--defsym=__heap_start=0x801100,--defsym=__heap_end=0x80ffff
118
 
122
 
119
EXTMEMOPTS =
123
EXTMEMOPTS =
120
 
124
 
121
BIOSOPTS = -Wl,-L.,-Tdata,$(BIOS_RAM_END) -lbios
125
BIOSOPTS = -Wl,-L$(BIOSDIR),-Tdata,$(BIOS_RAM_END) -lbios
122
 
126
 
123
# Linker flags.
127
# Linker flags.
124
#  -Wl,...:     tell GCC to pass this to linker.
128
#  -Wl,...:     tell GCC to pass this to linker.
125
#    -Map:      create map file
129
#    -Map:      create map file
126
#    --cref:    add cross reference to  map file
130
#    --cref:    add cross reference to  map file
Line 128... Line 132...
128
LDFLAGS += $(EXTMEMOPTS)
132
LDFLAGS += $(EXTMEMOPTS)
129
LDFLAGS += $(BIOSOPTS)
133
LDFLAGS += $(BIOSOPTS)
130
LDFLAGS += $(PRINTF_LIB) $(SCANF_LIB) $(MATH_LIB)
134
LDFLAGS += $(PRINTF_LIB) $(SCANF_LIB) $(MATH_LIB)
131
 
135
 
132
# ---------------------------------------------------------------------------
136
# ---------------------------------------------------------------------------
133
 
-
 
134
# Define directories, if needed.
-
 
135
DIRAVR = c:/progra~1/winavr
-
 
136
DIRAVRBIN = $(DIRAVR)/bin
-
 
137
DIRAVRUTILS = $(DIRAVR)/utils/bin
-
 
138
DIRINC = .
-
 
139
DIRLIB = $(DIRAVR)/avr/lib
-
 
140
 
-
 
141
 
137
 
142
# Define programs and commands.
138
# Define programs and commands.
143
SHELL = sh
139
SHELL = sh
144
CC = avr-gcc
140
CC = avr-gcc
145
AWK = awk
141
AWK = awk
146
OBJCOPY = avr-objcopy
142
OBJCOPY = avr-objcopy
147
OBJDUMP = avr-objdump
143
OBJDUMP = avr-objdump
148
SIZE = avr-size
144
SIZE = avr-size
149
NM = avr-nm
145
NM = avr-nm
150
REMOVE = rm -f
146
RM = rm -f
151
COPY = cp
147
CP = cp
152
 
148
MKDIR = mkdir
153
 
149
 
154
 
150
 
155
 
151
 
156
# Define Messages
152
# Define Messages
157
# English
153
# English
158
MSG_ERRORS_NONE = Errors: none
154
MSG_ERRORS_NONE = Errors: none
159
MSG_BEGIN = -------- begin --------
155
MSG_BEGIN = -------- begin --------
160
MSG_END = --------  end  --------
156
MSG_END = --------  end  --------
Line 169... Line 165...
169
MSG_LINKING = Linking:
165
MSG_LINKING = Linking:
170
MSG_COMPILING = Compiling:
166
MSG_COMPILING = Compiling:
171
MSG_ASSEMBLING = Assembling:
167
MSG_ASSEMBLING = Assembling:
172
MSG_DEPEND = Generating dependencies:
168
MSG_DEPEND = Generating dependencies:
173
MSG_CLEANING = Cleaning project:
169
MSG_CLEANING = Cleaning project:
-
 
170
MSG_CREATE = Creating:
174
 
171
 
175
 
-
 
176
 
-
 
177
 
-
 
178
# Define all object files.
172
# Define all object files.
179
OBJ = $(CSRC:.c=.o) $(ASRC:.S=.o) 
173
OBJ = $(filter %.o,$(SOURCES:.c=.o) $(SOURCES:.S=.o))
180
 
174
 
181
# Define all listing files.
175
# Define all listing files.
182
LST = $(ASRC:.S=.lst) $(CSRC:.c=.lst)
176
LST = $(OBJ:.o=.lst)
183
 
-
 
184
 
-
 
185
# Compiler flags to generate dependency files.
-
 
186
### GENDEPFLAGS = -Wp,-M,-MP,-MT,$(*F).o,-MF,.dep/$(@F).d
-
 
187
GENDEPFLAGS = -M -MG -MP -MT "$(<:.c=.o) $@" -MF $@
-
 
188
 
-
 
189
# Combine all necessary flags and optional flags.
-
 
190
# Add target processor to flags.
-
 
191
#ALL_CFLAGS = -mmcu=$(MCU) -I. $(CFLAGS)
-
 
192
#ALL_ASFLAGS = -mmcu=$(MCU) -I. -x assembler-with-cpp $(ASFLAGS)
-
 
193
 
-
 
194
 
177
 
-
 
178
# Define all dependency files.
-
 
179
DEP = $(OBJ:.o=.d)
195
 
180
 
-
 
181
BUILDDIRS = $(sort $(filter-out ./,$(dir $(OBJ))))
196
 
182
 
-
 
183
BIOS_RAM_END := $(shell $(AWK) '/0x[0-9a-f]+.*__bios_ram_end/ { print $$1 }' $(BIOSDIR)/bios.map)
-
 
184
 
-
 
185
# Compiler flags to generate dependency files.
-
 
186
GENDEPFLAGS = -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)"
197
 
187
 
198
# Default target.
188
# Default target.
199
all: begin sizebefore build sizeafter finished end
189
all: sizebefore buildtree config.h build sizeafter
200
 
190
 
201
build: elf hex eep lss sym
191
build: elf hex eep lss sym
202
 
192
 
203
elf: $(TARGET).elf
193
elf: $(TARGET).elf
204
hex: $(TARGET).hex
194
hex: $(TARGET).hex
205
eep: $(TARGET).eep
195
eep: $(TARGET).eep
206
lss: $(TARGET).lss 
196
lss: $(TARGET).lss 
207
sym: $(TARGET).sym
197
sym: $(TARGET).sym
208
config: config.h
-
 
209
 
-
 
210
install: hex
-
 
211
	$(CANUPLOAD) $(CANULFLAGS) -n $(NODE_ID) -f $(TARGET).hex -r
-
 
212
 
-
 
213
reset: 
-
 
214
	$(CANUPLOAD) $(CANULFLAGS) -n $(NODE_ID) -r
-
 
215
 
-
 
216
start: 
-
 
217
	$(CANUPLOAD) $(CANULFLAGS) -n $(NODE_ID) -s
-
 
218
 
-
 
219
# Eye candy.
-
 
220
# AVR Studio 3.x does not check make's exit code but relies on
-
 
221
# the following magic strings to be generated by the compile job.
-
 
222
begin:
-
 
223
	@echo
-
 
224
	@echo $(MSG_BEGIN)
-
 
225
 
-
 
226
finished:
-
 
227
	@echo $(MSG_ERRORS_NONE)
-
 
228
 
-
 
229
end:
-
 
230
	@echo $(MSG_END)
-
 
231
	@echo
-
 
232
 
198
 
-
 
199
buildtree: $(BUILDDIRS)
233
 
200
 
234
# Display size of file.
201
# Display size of file.
235
HEXSIZE = $(SIZE) --target=ihex $(TARGET).hex
202
HEXSIZE = $(SIZE) --target=ihex $(TARGET).hex
236
ELFSIZE = $(SIZE) $(TARGET).elf
203
ELFSIZE = $(SIZE) $(TARGET).elf
237
sizebefore:
204
sizebefore:
238
	@if [ -f $(TARGET).elf ]; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); echo; fi
205
	@if [ -f $(TARGET).elf ]; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); echo; fi
239
 
206
 
240
sizeafter:
207
sizeafter:
241
	@if [ -f $(TARGET).elf ]; then echo; echo $(MSG_SIZE_AFTER); $(ELFSIZE); echo; fi
208
	@if [ -f $(TARGET).elf ]; then echo; echo $(MSG_SIZE_AFTER); $(ELFSIZE); echo; fi
242
 
-
 
243
 
209
 
244
# Generate config.h from bios.inc and config.inc
210
# Generate config.h from bios.inc and config.inc
245
config.h: bios.inc config.inc
211
config.h: $(CFGDIR)/bios.inc $(CFGDIR)/config.inc
246
	@echo Generating $@
212
	@echo Generating $@
247
	@echo "/* This file is automatically generated. Do not edit. */\n" > $@
213
	@echo "/* This file is automatically generated. Do not edit. */\n" > $@
248
	@cat $^ | $(AWK) 'BEGIN { FS="="; print "#ifndef CONFIG_H_\n#define CONFIG_H_\n" } /^[^#].*=.*/ { print "#define "$$1,$$2 } END { print "\n#endif /*CONFIG_H_*/" }' >> $@
214
	@cat $^ | $(AWK) 'BEGIN { FS="="; print "#ifndef CONFIG_H_\n#define CONFIG_H_\n" } /^[^#].*=.*/ { print "#define "$$1,$$2 } END { print "\n#endif /*CONFIG_H_*/" }' >> $@
-
 
215
 
-
 
216
$(CFGDIR)/config.inc: $(SRCDIR)/config.inc.template
-
 
217
	@if [ ! -f $@ ]; then cp $< $@; fi
249
 
218
 
250
# Display compiler version information.
219
# Display compiler version information.
251
gccversion : 
220
gccversion : 
252
	@$(CC) --version
221
	@$(CC) --version
253
 
222
 
Line 258... Line 227...
258
--change-section-address .noinit-0x800000 \
227
--change-section-address .noinit-0x800000 \
259
--change-section-address .eeprom-0x810000 
228
--change-section-address .eeprom-0x810000 
260
 
229
 
261
 
230
 
262
coff: $(TARGET).elf
231
coff: $(TARGET).elf
263
	@echo
-
 
264
	@echo $(MSG_COFF) $(TARGET).cof
232
	@echo $(MSG_COFF) $(TARGET).cof
265
	$(COFFCONVERT) -O coff-avr $< $(TARGET).cof
233
	@$(COFFCONVERT) -O coff-avr $< $(TARGET).cof
266
 
-
 
267
 
234
 
268
extcoff: $(TARGET).elf
235
extcoff: $(TARGET).elf
269
	@echo
-
 
270
	@echo $(MSG_EXTENDED_COFF) $(TARGET).cof
236
	@echo $(MSG_EXTENDED_COFF) $(TARGET).cof
271
	$(COFFCONVERT) -O coff-ext-avr $< $(TARGET).cof
237
	@$(COFFCONVERT) -O coff-ext-avr $< $(TARGET).cof
272
 
-
 
273
 
-
 
274
 
238
 
275
# Create final output files (.hex, .eep) from ELF output file.
239
# Create final output files (.hex, .eep) from ELF output file.
276
%.hex: %.elf
240
%.hex: %.elf
277
	@echo
-
 
278
	@echo $(MSG_FLASH) $@
241
	@echo $(MSG_FLASH) $@
279
	$(OBJCOPY) -j .text -j .data -O ihex $< $@
242
	@$(OBJCOPY) -j .text -j .data -O ihex $< $@
280
 
243
 
281
%.eep: %.elf
244
%.eep: %.elf
282
	@echo
-
 
283
	@echo $(MSG_EEPROM) $@
245
	@echo $(MSG_EEPROM) $@
284
	-$(OBJCOPY) -j .eeprom --set-section-flags=.eeprom="alloc,load" \
246
	-@$(OBJCOPY) -j .eeprom --set-section-flags=.eeprom="alloc,load" \
285
	--change-section-lma .eeprom=0 -O ihex $< $@
247
	--change-section-lma .eeprom=0 -O ihex $< $@
286
 
248
 
287
# Create extended listing file from ELF output file.
249
# Create extended listing file from ELF output file.
288
%.lss: %.elf
250
%.lss: %.elf
289
	@echo
-
 
290
	@echo $(MSG_EXTENDED_LISTING) $@
251
	@echo $(MSG_EXTENDED_LISTING) $@
291
	$(OBJDUMP) -h -S $< > $@
252
	@$(OBJDUMP) -h -S $< > $@
292
 
253
 
293
# Create a symbol table from ELF output file.
254
# Create a symbol table from ELF output file.
294
%.sym: %.elf
255
%.sym: %.elf
295
	@echo
-
 
296
	@echo $(MSG_SYMBOL_TABLE) $@
256
	@echo $(MSG_SYMBOL_TABLE) $@
297
	$(NM) -n $< > $@
257
	@$(NM) -n $< > $@
298
 
-
 
299
 
-
 
300
 
258
 
301
# Link: create ELF output file from object files.
259
# Link: create ELF output file from object files.
302
.SECONDARY : $(TARGET).elf
260
.SECONDARY : $(TARGET).elf
303
.PRECIOUS : $(OBJ)
261
.PRECIOUS : $(OBJ)
304
ifneq (,$(filter atmega88 atmega168, $(MCU)))
262
ifneq (,$(filter atmega88 atmega168, $(MCU)))
305
%.elf: $(OBJ)
263
%.elf: $(OBJ)
306
	@echo
-
 
307
	@echo $(MSG_LINKING) $@
264
	@echo $(MSG_LINKING) $@
308
	@echo GCC bug workaround for ATmega88/ATmega168:
265
	@echo GCC bug workaround for ATmega88/ATmega168:
309
	eval $$($(CC) -v $(CFLAGS) -o $@ $^ $(LDFLAGS) 2>&1 | $(AWK) '{ if (gsub("0x800100","$(BIOS_RAM_END)") == 1) print }')
266
	@eval $$($(CC) -v $(CFLAGS) -o $@ $^ $(LDFLAGS) 2>&1 | $(AWK) '{ if (gsub("0x800100","$(BIOS_RAM_END)") == 1) print }')
310
else
267
else
311
%.elf: $(OBJ)
268
%.elf: $(OBJ)
312
	@echo
-
 
313
	@echo $(MSG_LINKING) $@
269
	@echo $(MSG_LINKING) $@
314
	$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
270
	@$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
315
endif
271
endif
316
 
272
 
317
# Compile: create object files from C source files.
273
# Compile: create object files from C source files.
318
%.o : %.c
274
%.o : %.c
319
	@echo
-
 
320
	@echo $(MSG_COMPILING) $<
275
	@echo $(MSG_COMPILING) $<
321
	$(CC) -c $(CFLAGS) $< -o $@ 
276
	@$(CC) -c $(CFLAGS) $< -o $@ 
322
 
-
 
323
 
277
 
324
# Compile: create assembler files from C source files.
278
# Compile: create assembler files from C source files.
325
%.s : %.c
279
%.s : %.c
326
	$(CC) -S $(CFLAGS) $< -o $@
280
	@$(CC) -S $(CFLAGS) $< -o $@
327
 
-
 
328
 
281
 
329
# Assemble: create object files from assembler source files.
282
# Assemble: create object files from assembler source files.
330
%.o : %.S
283
%.o : %.S
331
	@echo
-
 
332
	@echo $(MSG_ASSEMBLING) $<
284
	@echo $(MSG_ASSEMBLING) $<
333
	$(CC) -c $(ASFLAGS) $< -o $@
285
	$(CC) -c $(ASFLAGS) $< -o $@
334
 
286
 
335
# Depends: create dependency files from c source files.
287
# Depends: create dependency files from c source files.
336
%.d : %.c
288
#%.d : %.c | $(BUILDDIRS)
337
	@echo $(MSG_DEPEND) $<
289
#	@echo $(MSG_DEPEND) $<
338
	@$(CC) -c $(CFLAGS) $(GENDEPFLAGS) $<
290
#	@$(CC) -c $(CFLAGS) $(GENDEPFLAGS) $<
-
 
291
 
-
 
292
# Buildtree: create directories for output files.
-
 
293
$(BUILDDIRS) :
-
 
294
	@echo $(MSG_CREATE) $@
-
 
295
	@$(MKDIR) -p $@
339
 
296
 
340
# Target: clean project.
297
# Target: clean project.
341
clean: begin clean_list finished end
-
 
342
 
-
 
343
clean_list :
298
clean: 
344
	@echo
-
 
345
	@echo $(MSG_CLEANING)
299
	@echo $(MSG_CLEANING)
346
	$(REMOVE) $(TARGET).hex
300
	$(RM) $(TARGET).hex
347
	$(REMOVE) $(TARGET).eep
301
	$(RM) $(TARGET).eep
348
	$(REMOVE) $(TARGET).obj
-
 
349
	$(REMOVE) $(TARGET).cof
302
	$(RM) $(TARGET).cof
350
	$(REMOVE) $(TARGET).elf
303
	$(RM) $(TARGET).elf
351
	$(REMOVE) $(TARGET).map
304
	$(RM) $(TARGET).map
352
	$(REMOVE) $(TARGET).obj
-
 
353
	$(REMOVE) $(TARGET).a90
-
 
354
	$(REMOVE) $(TARGET).sym
305
	$(RM) $(TARGET).sym
355
	$(REMOVE) $(TARGET).lnk
-
 
356
	$(REMOVE) $(TARGET).lss
306
	$(RM) $(TARGET).lss
357
	$(REMOVE) $(OBJ)
307
	$(RM) $(OBJ)
358
	$(REMOVE) $(LST)
308
	$(RM) $(DEP)
359
	$(REMOVE) $(CSRC:.c=.s)
-
 
360
	$(REMOVE) $(CSRC:.c=.d)
-
 
361
	$(REMOVE) -r .dep
309
	$(RM) $(LST)
362
	$(REMOVE) config.h
310
	$(RM) config.h
363
 
311
 
364
 
312
distclean: clean
-
 
313
	$(RM) -r $(BUILDDIRS)
365
 
314
 
366
# Include the dependency files.
315
# Include the dependency files.
-
 
316
ifneq ($(MAKECMDGOALS),clean)
-
 
317
ifneq ($(strip $(DEP)),)
367
-include $(CSRC:%.c=%.d)
318
-include $(DEP)
-
 
319
endif
368
 
320
endif
369
 
321
 
370
# Listing of phony targets.
322
# Listing of phony targets.
371
.PHONY : all begin finish end sizebefore sizeafter gccversion \
323
.PHONY : all sizebefore sizeafter build \
372
build elf hex eep lss sym config coff extcoff \
324
elf hex eep lss sym coff extcoff clean \
373
clean clean_list program programlock programinit
325
distclean gccversion
374
 
326