Subversion Repositories HomeAutomation

Rev

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

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