1 # FreeEMS - the open source engine management system
3 # Copyright 2008, 2009, 2010 Fred Cooke
5 # This Makefile is part of the FreeEMS project.
7 # FreeEMS software is free software: you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation, either version 3 of the License, or
10 # (at your option) any later version.
12 # FreeEMS software is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
17 # You should have received a copy of the GNU General Public License
18 # along with any FreeEMS software. If not, see http://www.gnu.org/licenses/
20 # We ask that if you make any changes to this file you email them upstream to
21 # us at admin(at)diyefi(dot)org or, even better, fork the code on github.com!
23 # Thank you for choosing FreeEMS to run your engine!
27 # This Makefile is designed to be run with GNU make! Accept no substitute! #
30 # Top level targets: #
33 # Builds all output files in the slow multi stage way with all debugging #
35 # Compiles from C straight to objects, links to elfs and copies to s19s #
37 # Permanently removes all build artifact files and directories #
39 # Cleans the project, builds it from scratch, copies the s19 files up to #
40 # the firmware directory, zips each s19 separately, zips all of the #
41 # documentation, cleans the project again and lastly zips the entire #
45 # When doing a full build the following steps are taken: #
47 # 1) Pre-process all of the C files #
48 # 2) Compile all preprocessed C files into assembly files #
49 # 3) Assemble all assembly files into object files #
50 # 4) Dump the contents of all object files #
51 # 5) Link one decoder with garbage collection and reporting turned on #
52 # 6) Link each decoder without garbage collection #
53 # 7) Dump the contents of each decoders elf #
54 # 8) Produce a memory map for each elf #
55 # 9) Produce a readelf dump for each elf #
56 # 10) Produce an s19 loadable firmware file for each elf #
62 # All Fixed Variables #
70 RELEASEDIR = ../firmware
71 DOXYDOCDIR = ../docs/doxygen-html
72 MAINDIR = freeems-vanilla
79 PPCDIR = preprocessedc
81 # Release tag message file
82 RELTAG = $(OUTDIR)/gitTagMessage.txt
83 TAGNAME = $(OUTDIR)/gitTagName.txt
85 # Set the windows/non debian path first and then overwrite
86 # with the debian one so we can grep the deb line out and
87 # end up with a working windows make file in an automated
88 # way. Additionally, please ensure you do not add any sets
89 # of three . . . in a row or the line will be missing from
90 # the windows version. Likewise sets of ### longer than 6
91 # or so are also at risk :-)
101 COPY = $(PREFIX)objcopy
102 DUMP = $(PREFIX)objdump
104 RE = $(PREFIX)readelf
113 # Indirect dependencies - any header change means a full
114 # recompile. This can be improved upon and made more specific.
120 CINCS = injectorISR.c
121 FLASHH = flashWrite.h
122 ASMH = 9S12XDP512asm.s
123 LOOKUPH = tableLookup.h
124 WMFILE = Makefile.windows
125 ISRSH = commsISRs.h injectionISRs.h
126 COMMSH = commsCore.h blockDetailsLookup.h
127 LINKER = memory.x regions.x hc9s12xdp512elfb.x
128 GLOBALH1 = freeEMS.h 9S12XDP512.h memory.h globalConstants.h structs.h
129 GLOBALH2 = globalDefines.h errorDefines.h TunableConfigs.h FixedConfigs.h
130 FUELH = fuelAndIgnitionCalcs.h derivedVarsGenerator.h coreVarsGenerator.h
131 RPMH = Simple.h NipponDenso.h LT1-360-8.h Subaru-36-2-2-2.h MissingTeeth.h MiataNB.h
133 # Let's keep this to a bare minimum! If you write ASM code
134 # please provide an matching alternate C implementation too.
135 HANDASMS = flashBurn.s
138 # .c files from inc/ should be included here as deps for the parts they are relied on by!!
139 ALLHEADERS1 = $(GLOBALH1) $(COMMSH) $(ISRSH) $(UTILH) $(RPMH) $(FLASHH)
140 ALLHEADERS2 = $(GLOBALH2) $(FUELH) $(MAINH) $(INITH) $(ISRH) $(LOOKUPH)
141 ALLH1 = $(patsubst %.h,$(INCDIR)/%.h,$(ALLHEADERS1))
142 ALLH2 = $(patsubst %.h,$(INCDIR)/%.h,$(ALLHEADERS2))
143 ALLH3 = $(patsubst %.c,$(INCDIR)/%.c,$(CINCS))
144 ALLH4 = $(LINKER) $(MFILE) $(INCDIR)/$(ASMH)
145 ALLH = $(ALLH1) $(ALLH2) $(ALLH3) $(ALLH4)
147 # Warning : do not include .c files from inc/ as they are
148 # included into the other C files and automatically compiled.
151 FIXEDCLASSES = FixedConfig1.c FixedConfig2.c
152 LOOKUPCLASSES1 = IATTransferTable.c CHTTransferTable.c
153 LOOKUPCLASSES2 = MAFTransferTable.c TestTransferTable.c
154 FUELCLASSES = FuelTables.c FuelTables2.c
155 TIMECLASSES = TimingTables.c TimingTables2.c
156 TUNECLASSES = TunableConfig.c TunableConfig2.c
159 UTILCLASSES = tableLookup.c init.c utils.c globalConstants.c
160 MATHCLASSES = coreVarsGenerator.c derivedVarsGenerator.c fuelAndIgnitionCalcs.c
161 COMCLASSES = flashWrite.c commsCore.c blockDetailsLookup.c
162 ISRCLASSES = interrupts.c injectionISRs.c ignitionISRs.c commsISRs.c realtimeISRs.c miscISRs.c
164 # All but the engine position/RPM combined here
165 SOURCE = freeEMS.c staticInit.c main.c $(UTILCLASSES) $(MATHCLASSES) $(COMCLASSES) $(ISRCLASSES)
166 DATA = $(FIXEDCLASSES) $(LOOKUPCLASSES1) $(LOOKUPCLASSES2) $(FUELCLASSES) $(TIMECLASSES) $(TUNECLASSES)
167 CLASSES = $(SOURCE) $(DATA)
169 # Engine position/RPM here
170 RPMCLASSES = Simple.c NipponDenso.c LT1-360-8.c Subaru-36-2-2-2.c MissingTeeth.c MiataNB.c
174 PREPROCESSED = $(patsubst %.c,$(PPCDIR)/%.pp.c,$(CLASSES))
175 ASSEMBLIES = $(patsubst %.c,$(ASMDIR)/%.s,$(CLASSES))
176 OBJECTS = $(patsubst %.c,$(OBJDIR)/%.o,$(CLASSES)) $(patsubst %.s,$(OBJDIR)/%.o,$(HANDASMS))
177 DUMPS = $(patsubst %.c,$(BUGDIR)/%.dmp,$(CLASSES)) $(patsubst %.s,$(BUGDIR)/%.dmp,$(HANDASMS))
179 # Convert RPM extensions
180 PREPROCESSEDRPM = $(patsubst %.c,$(PPCDIR)/%.pp.c,$(RPMCLASSES))
181 ASSEMBLIESRPM = $(patsubst %.c,$(ASMDIR)/%.s,$(RPMCLASSES))
182 OBJECTSRPM = $(patsubst %.c,$(OBJDIR)/%.o,$(RPMCLASSES)) #$(patsubst %.s,$(OBJDIR)/%.o,$(RPMHANDASMS))
183 DUMPSRPM = $(patsubst %.c,$(BUGDIR)/%.dmp,$(RPMCLASSES)) #$(patsubst %.s,$(BUGDIR)/%.dmp,$(RPMHANDASMS))
185 # Convert to output files
186 ALLELFSC = $(patsubst %.c,$(OUTDIR)/$(OUTPREFIX)-$(VERSION)-%.elf,$(RPMCLASSES))
187 ALLELFSASM = #$(patsubst %.s,$(OUTDIR)/$(OUTPREFIX)-$(VERSION)-%.elf,$(RPMHANDASMS))
188 ALLDMPSC = $(patsubst %.c,$(BUGDIR)/$(OUTPREFIX)-$(VERSION)-%.dmp,$(RPMCLASSES))
189 ALLDMPSASM = #$(patsubst %.s,$(BUGDIR)/$(OUTPREFIX)-$(VERSION)-%.dmp,$(RPMHANDASMS))
190 ALLMAPSC = $(patsubst %.c,$(BUGDIR)/$(OUTPREFIX)-$(VERSION)-%.map,$(RPMCLASSES))
191 ALLMAPSASM = #$(patsubst %.s,$(BUGDIR)/$(OUTPREFIX)-$(VERSION)-%.map,$(RPMHANDASMS))
192 ALLREADC = $(patsubst %.c,$(BUGDIR)/$(OUTPREFIX)-$(VERSION)-%.ree,$(RPMCLASSES))
193 ALLREADASM = #$(patsubst %.s,$(BUGDIR)/$(OUTPREFIX)-$(VERSION)-%.ree,$(RPMHANDASMS))
194 ALLS19SC = $(patsubst %.c,$(S19DIR)/$(OUTPREFIX)-$(VERSION)-%.s19,$(RPMCLASSES))
195 ALLS19SASM = #$(patsubst %.s,$(S19DIR)/$(OUTPREFIX)-$(VERSION)-%.s19,$(RPMHANDASMS))
196 ALLELFS = $(ALLELFSC) $(ALLELFSASM)
197 ALLDMPS = $(ALLDMPSC) $(ALLDMPSASM)
198 ALLMAPS = $(ALLMAPSC) $(ALLMAPSASM)
199 ALLREAD = $(ALLREADC) $(ALLREADASM)
200 ALLS19S = $(ALLS19SC) $(ALLS19SASM)
201 ALLMD5S = $(patsubst $(S19DIR)/%,$(RELEASEDIR)/%.md5,$(ALLS19S))
202 ALLSHA1S = $(patsubst $(S19DIR)/%,$(RELEASEDIR)/%.sha1,$(ALLS19S))
203 ALLS19ZIPS = $(patsubst $(S19DIR)/%,$(RELEASEDIR)/%.zip,$(ALLS19S))
205 # Convert to output files for GC variants
206 GCDELFSC = $(patsubst %.c,$(OUTDIR)/$(OUTPREFIX)-$(VERSION)-%.gc.elf,$(RPMCLASSES))
207 GCDELFSASM = #$(patsubst %.s,$(OUTDIR)/$(OUTPREFIX)-$(VERSION)-%.gc.elf,$(RPMHANDASMS))
208 GCDS19SC = $(patsubst %.c,$(S19DIR)/$(OUTPREFIX)-$(VERSION)-%.gc.s19,$(RPMCLASSES))
209 GCDS19SASM = #$(patsubst %.s,$(S19DIR)/$(OUTPREFIX)-$(VERSION)-%.gc.s19,$(RPMHANDASMS))
210 GCDELFS = $(GCDELFSC) $(GCDELFSASM)
211 GCDS19S = $(GCDS19SC) $(GCDELFSASM)
216 # All Command Line Options #
219 # M68hc1x GCC Options we may want : -minmax -mlong-calls
221 # http://www.gnu.org/software/m68hc11/m68hc11_gcc.html shows code size with different options used
222 # include debug info, optimise , 16 bit ints, hcs12 platform
223 GCCOPTS1 = -g -Wall -Werror -Winline -O -m68hcs12 -mshort -ffunction-sections
224 GCCOPTS2 = -fomit-frame-pointer -msoft-reg-count=8 -mauto-incdec -fsigned-char
225 GCCOPTS = $(GCCOPTS1) $(GCCOPTS2)
226 # -ffunction-sections option splits out the functions such that the garbage collection can get
227 # them on a per section basis. I'm not sure, but this could be harmful to paged code so may
228 # have to review this at a later date perhaps splitting paged functions from nonpaged ones.
230 # pass to linker, link for hc12
231 # The vectors address in the linker options is the VMA address and must be short form 0xF710, not a paged address.
232 LINKOPTS = -Wl,-defsym,vectors_addr=0xF710,-m,m68hc12elfb,-T,hc9s12xdp512elfb.x
233 LINKOPTSGC = -Wl,--gc-sections,--print-gc-sections,-defsym,vectors_addr=0xF710,-m,m68hc12elfb,-T,hc9s12xdp512elfb.x
234 # Use this to get a map dump when the linker fails in a confusing way : --print-map
236 # If using the below option for paged flash, the ADDRESS_TYPE
237 # field in the freeEMSloader script should be updated to match.
238 COPYOPTS = --output-target=srec \
239 --change-section-lma .fixedconf1+0xFD4000 \
240 --change-section-lma .fixedconf2+0xFD4000 \
241 --change-section-lma .text1+0xFD4000 \
242 --change-section-lma .text+0xFEC000 \
243 --change-section-lma .data+0xFEC000 \
244 --change-section-lma .vectors+0xFEC000 \
245 --change-section-lma .rodata+0xFEC000 \
246 --only-section=.fixedconf1 \
247 --only-section=.fixedconf2 \
248 --only-section=.text \
249 --only-section=.text1 \
250 --only-section=.data \
251 --only-section=.vectors \
252 --only-section=.rodata \
253 --change-section-lma .ppageF8=0xF88000 \
254 --change-section-lma .fpageF9=0xF98000 \
255 --change-section-lma .dpageF9=0xF9A000 \
256 --change-section-lma .ppageFE=0xFE8000 \
257 --only-section=.ppageF8 \
258 --only-section=.fpageF9 \
259 --only-section=.dpageF9 \
260 --only-section=.ppageFE \
261 --change-section-lma .fpageFA=0xFA8000 \
262 --change-section-lma .dpageFA=0xFAA000 \
263 --change-section-lma .fpageFB=0xFB8000 \
264 --change-section-lma .dpageFB1=0xFBA000 \
265 --change-section-lma .dpageFB2=0xFBA400 \
266 --change-section-lma .dpageFB3=0xFBA800 \
267 --change-section-lma .dpageFB4=0xFBAC00 \
268 --change-section-lma .dpageFB5=0xFBB000 \
269 --change-section-lma .dpageFB6=0xFBB400 \
270 --change-section-lma .dpageFB7=0xFBB800 \
271 --change-section-lma .dpageFB8=0xFBBC00 \
272 --change-section-lma .fpageFC=0xFC8000 \
273 --change-section-lma .dpageFC=0xFCA000 \
274 --only-section=.dpageFA \
275 --only-section=.fpageFA \
276 --only-section=.dpageFB1 \
277 --only-section=.dpageFB2 \
278 --only-section=.dpageFB3 \
279 --only-section=.dpageFB4 \
280 --only-section=.dpageFB5 \
281 --only-section=.dpageFB6 \
282 --only-section=.dpageFB7 \
283 --only-section=.dpageFB8 \
284 --only-section=.fpageFB \
285 --only-section=.dpageFC \
286 --only-section=.fpageFC
287 # --change-section-lma .ppageFD=0xFD8000 \
288 # --change-section-lma .ppageFF=0xFF8000 \
289 # --only-section=.ppageFD \ This is left here for clarity only (equivalent to text1 but paged)
290 # --only-section=.ppageFF This is left here for clarity only (equivalent to text but paged)
291 # Changes to the above options should be reflected in memory.x and memory.h also!
293 # The following flash areas can only be used once Sean has written his loader app :
294 # --only-section=.ppageE0 \
295 # --only-section=.ppageE1 \
296 # --only-section=.ppageE2 \
297 # --only-section=.ppageE3 \
298 # --only-section=.ppageE4 \
299 # --only-section=.ppageE5 \
300 # --only-section=.ppageE6 \
301 # --only-section=.ppageE7 \
302 # --only-section=.ppageE8 \
303 # --only-section=.ppageE9 \
304 # --only-section=.ppageEA \
305 # --only-section=.ppageEB \
306 # --only-section=.ppageEC \
307 # --only-section=.ppageED \
308 # --only-section=.ppageEE \
309 # --only-section=.ppageEF \
310 # --only-section=.ppageF0 \
311 # --only-section=.ppageF1 \
312 # --only-section=.ppageF2 \
313 # --only-section=.ppageF3 \
314 # --only-section=.ppageF4 \
315 # --only-section=.ppageF5 \
316 # --only-section=.ppageF6 \
317 # --only-section=.ppageF7 \
318 # --change-section-lma .ppageE0=0xE08000 \
319 # --change-section-lma .ppageE1=0xE18000 \
320 # --change-section-lma .ppageE2=0xE28000 \
321 # --change-section-lma .ppageE3=0xE38000 \
322 # --change-section-lma .ppageE4=0xE48000 \
323 # --change-section-lma .ppageE5=0xE58000 \
324 # --change-section-lma .ppageE6=0xE68000 \
325 # --change-section-lma .ppageE7=0xE78000 \
326 # --change-section-lma .ppageE8=0xE88000 \
327 # --change-section-lma .ppageE9=0xE98000 \
328 # --change-section-lma .ppageEA=0xEA8000 \
329 # --change-section-lma .ppageEB=0xEB8000 \
330 # --change-section-lma .ppageEC=0xEC8000 \
331 # --change-section-lma .ppageED=0xED8000 \
332 # --change-section-lma .ppageEE=0xEE8000 \
333 # --change-section-lma .ppageEF=0xEF8000 \
334 # --change-section-lma .ppageF0=0xF08000 \
335 # --change-section-lma .ppageF1=0xF18000 \
336 # --change-section-lma .ppageF2=0xF28000 \
337 # --change-section-lma .ppageF3=0xF38000 \
338 # --change-section-lma .ppageF4=0xF48000 \
339 # --change-section-lma .ppageF5=0xF58000 \
340 # --change-section-lma .ppageF6=0xF68000 \
341 # --change-section-lma .ppageF7=0xF78000 \
346 # Dependency And Target Summary #
350 # 1) help - This comment block #
351 # 2) all - Executes alldebug, slow, slowgc and size #
352 # 3) dirs - Creates all of the directories required to build #
353 # 4) fast - Compiles direct to object code and links once with no debug #
354 # 5) slow - Three stage compilation with assembly retained #
355 # 6) slowgc - As above, but with garbage collection during linking #
356 # 7) alldebug - Generates all debug output files #
357 # 8) install - Not yet implemented #
358 # 9) release - Not yet implemented #
359 # 10) clean - Removes all files and directories generated by building #
361 # Second level targets: #
365 # 1) preprocess - run the C preprocessor over the raw C files #
366 # 2) compile - compile the preprocessed C into assembly #
367 # 3) assemble - assemble the assembly files into object files #
371 # 1) link - Generate ELFs objects #
372 # 2) gclink - As above, but with garbage collection #
373 # 3) s19 - Create s19s from elfs #
374 # 4) gcs19 - Create s19s from gc elfs #
378 # 1) maps - Memory map files #
379 # 2) rees - Readelf dumps #
380 # 3) elfdmps - Classic objdump output for final elfs #
381 # 4) objdmps - Classic objdump output for each object file #
383 # Additionally any of the output files can be used as a target directly. #
384 # This is perfect for building only what is required for a specific s19. #
385 # It is also perfect for working with a single file as you don't have to #
386 # wait for other unrelated things to build first nor do you have to wait #
387 # for other files to continue building after yours is successful. Before #
388 # using individual output files for targets, please run 'make dirs'. #
394 # All Target Dependencies #
397 # Build everything the long way
398 all: alldebug gcs19 s19 size
399 # Single stage compilation
400 fast: single s19 size
401 # Multi stage compilation
403 # Multi stage compilation with garbage collection
404 # Clean all except release
405 clean: cleanasm cleanobj cleanout cleanppc cleans19 cleandebug
407 alldebug: maps rees elfdmps objdmps
408 # Load the s19 of your choice
409 #install: clean fast loader
411 release: relprep relbuild relpack relperf
412 relprep: testgit clean cleanrelease cleandoxy
413 relbuild: md5sums md5sumsgc sha1sums sha1sumsgc s19zips s19zipsgc
414 relpack: zipdocs zipmain zipsite zipsrc
415 relperf: clean relcommit tagmessage tagrelease
420 # Debug Target Definitions #
425 maps: link $(BUGDIR) mapsmsg $(ALLMAPS)
427 $(ALLMAPS): $(BUGDIR)/%.map: $(OUTDIR)/%.elf
433 rees: link $(BUGDIR) reesmsg $(ALLREAD)
435 $(ALLREAD): $(BUGDIR)/%.ree: $(OUTDIR)/%.elf
441 elfdmps: link $(BUGDIR) elfdmpsmsg $(ALLDMPS)
443 $(ALLDMPS): $(BUGDIR)/%.dmp: $(OUTDIR)/%.elf
444 $(DUMP) -spSd $< > $@
449 objdmps: assemble $(BUGDIR) objdmpmsg $(DUMPS) $(DUMPSRPM)
451 $(DUMPS) $(DUMPSRPM): $(BUGDIR)/%.dmp: $(OBJDIR)/%.o
452 $(DUMP) -spSd $< > $@
457 # Fast Single Stage Compile Target Definition #
465 # Link and Copy Target Definitions #
469 link: assemble $(OUTDIR) linkmsg $(ALLELFS)
471 # link the object files into an elf executable
472 $(ALLELFS): $(OUTDIR)/$(OUTPREFIX)-$(VERSION)-%.elf: $(OBJDIR)/%.o $(OBJECTS)
473 $(GCC) $(GCCOPTS) $(LINKOPTS) -o $@ $< $(OBJECTS)
481 s19: link $(S19DIR) s19msg $(ALLS19S)
482 # the gc dependency is temporary until i figure out if the .tramp removal is an issue or not.
484 # Generate the loadable s19 firmware files
485 $(ALLS19S): $(S19DIR)/%.s19: $(OUTDIR)/%.elf
486 $(COPY) $(COPYOPTS) $< $@
495 # Size Measuring Target Definition #
498 size: assemble # TODO this should be run for each s19 target with only the one rpm .o file
499 $(SIZE) $(OBJECTSRPM)
500 $(SIZE) -t $(OBJECTS)
501 # Add one decoder to the total above and #
502 # subtract the size reported for freeEMS.o #
503 # this will give you the actual image size #
505 # Thank you for building FreeEMS firmware!!! #
511 # Preprocess, Compile and Assemble Target Definitions #
515 preprocess: $(PPCDIR) preprocessmsg $(PREPROCESSED) $(PREPROCESSEDRPM)
517 # Generate preprocessed source files to examine
518 $(PREPROCESSED) $(PREPROCESSEDRPM): $(PPCDIR)/%.pp.c: %.c $(ALLH)
519 $(GCC) $(GCCOPTS) -E $< > $@
523 compile: preprocess compilemsg $(ASSEMBLIES) $(ASSEMBLIESRPM)
525 # Generate assembly files to examine
526 $(ASSEMBLIES) $(ASSEMBLIESRPM): $(ASMDIR)/%.s: $(PPCDIR)/%.pp.c
527 $(GCC) $(GCCOPTS) -x cpp-output -S -o $@ $<
531 assemble: compile $(OBJDIR) assemblemsg $(OBJECTS) $(OBJECTSRPM)
533 # Generate object files to link
534 $(OBJECTS) $(OBJECTSRPM): $(OBJDIR)/%.o: $(ASMDIR)/%.s
535 $(GCC) $(GCCOPTS) -c -o $@ $<
540 # Release Procedure Target Definitions #
546 @echo "Is everything checked in?"
547 test `git status -s | wc -l` -eq 0
548 @echo "Are we behind?"
549 test `git rev-list \`git show-ref --hash refs/heads/master\`..\`git show-ref --hash refs/remotes/origin/master\` | wc -l` -eq 0
550 @echo "Are we ahead?"
551 test `git rev-list \`git show-ref --hash refs/remotes/origin/master\`..\`git show-ref --hash refs/heads/master\` | wc -l` -eq 0
554 ALLMD5S = $(patsubst $(S19DIR)/%,$(RELEASEDIR)/%.md5,$(ALLS19S))
558 md5sums: s19 md5sumsmsg $(ALLMD5S)
560 $(ALLMD5S): $(RELEASEDIR)/%.s19.md5: $(S19DIR)/%.s19
566 sha1sums: s19 sha1sumsmsg $(ALLSHA1S)
568 $(ALLSHA1S): $(RELEASEDIR)/%.s19.sha1: $(S19DIR)/%.s19
574 s19zips: s19 s19zipsmsg $(ALLS19ZIPS)
576 $(ALLS19ZIPS): $(RELEASEDIR)/%.s19.zip: $(S19DIR)/%.s19
581 git commit -m "Automatically committing release files for FreeEMS version $(VERSION)!" $(RELEASEDIR)/
590 tagrelease: tagname tagmessage
591 git tag -F $(RELTAG) `cat $(TGANAME)` HEAD
599 #zip entire directory to parent
607 #doxygen -f Doxyfile ouput file option | grep Warning
611 #zip doxygen to parent
615 #zip just src to parent
617 #EXCLUDES = --exclude=$${OLDPWD}/../.git --exclude=$${OLDPWD}/../docs --exclude=$${OLDPWD}/../src/$(OBJDIR) --exclude=$${OLDPWD}/../src/$(PPCDIR) --exclude=$${OLDPWD}/../src/$(OUTDIR) --exclude=$${OLDPWD}/../src/$(BUGDIR) --exclude=$${OLDPWD}/../src/$(S19DIR) --exclude=$${OLDPWD}/$(DOXYDOCDIR) --exclude=$${OLDPWD}/$(RELEASEDIR)
618 EXCLUDES = --exclude=${MAINDIR}/.git --exclude=${MAINDIR}/docs --exclude=${MAINDIR}/src/$(OBJDIR) --exclude=${MAINDIR}/src/$(PPCDIR) --exclude=${MAINDIR}/src/$(OUTDIR) --exclude=${MAINDIR}/src/$(BUGDIR) --exclude=${MAINDIR}/src/$(S19DIR) --exclude=${MAINDIR}/$(S19DIR) --exclude=${MAINDIR}/src/$(DOXYDOCDIR)
621 # cd ../../;tar --show-omitted-dirs ${EXCLUDES} -cjf freeems-${VERSION}-`date +%s`.tar.bz2 $${OLDPWD}/../;cd -
624 tar -C ../../ ${EXCLUDES} -cjf ../../freeems-${VERSION}-`date +%s`.tar.bz2 ${MAINDIR}
628 # Create Directory Target Definitions #
630 # Assembly, release and inc directories don't get removed.
632 dirs: $(BUGDIR) $(S19DIR) $(PPCDIR) $(OUTDIR) $(OBJDIR)
635 $(MKDIR) $(BUGDIR)$(PATHSEP)hack
636 rmdir $(BUGDIR)$(PATHSEP)hack
639 $(MKDIR) $(S19DIR)$(PATHSEP)hack
640 rmdir $(S19DIR)$(PATHSEP)hack
643 $(MKDIR) $(PPCDIR)$(PATHSEP)hack
644 rmdir $(PPCDIR)$(PATHSEP)hack
647 $(MKDIR) $(OUTDIR)$(PATHSEP)hack
648 rmdir $(OUTDIR)$(PATHSEP)hack
651 $(MKDIR) $(OBJDIR)$(PATHSEP)hack
652 rmdir $(OBJDIR)$(PATHSEP)hack
657 # Clean Target Definitions #
660 $(RM) $(ASSEMBLIES) $(ASSEMBLIESRPM)
678 $(RM) $(RELEASEDIR)/*.zip
679 $(RM) $(RELEASEDIR)/*.md5
680 $(RM) $(RELEASEDIR)/*.sha1
685 # Declare targets that aren't real files #
688 # Aggregators top level
689 .PHONY: all fast slow slowgc single help dirs
691 # Aggregators middle level
692 .PHONY: preprocess compile assemble link gclink s19 gcs19
694 # Aggregators debug level
695 .PHONY: alldebug maps rees objdmps elfdmps size
698 .PHONY: release relprep relperf relbuild relpack
699 .PHONY: md5sums sha1sums s19zips sha1sumsgc s19zips s19zipsgc
700 .PHONY: testgit relcommit tagname tagmessage tagrelease
703 .PHONY: mapsmsg reesmsg elfdmpsmsg objdmpmsg linkmsg gclinkmsg
704 .PHONY: s19msg gcs19msg preprocessmsg compilemsg assemblemsg
705 .PHONY: md5sumsmsg sha1sumsmsg s19zipsmsg
708 .PHONY: clean cleanasm cleanppc cleanobj cleanout cleans19 cleandebug cleanrelease