Differences

This shows you the differences between two versions of the page.

Link to this comparison view

cc65:project_grows [2013-01-22 15:28]
silverdr [OK, I like it but I need more functionality...]
cc65:project_grows [2013-03-03 18:51] (current)
silverdr [OK, I like it but I need more functionality...]
Line 175: Line 175:
 ===== OK, I like it but I need more functionality... ===== ===== OK, I like it but I need more functionality... =====
  
-So - you like it, you say.. I guess it's good, isn't it? If you need the extra finctionality, you can easily (who could have guessed :-)) add it using for example new make targets stored in additional files, which names end with ".mk". One of such examples, which the author of this words had a need for, is creating and populating disk images before test running the freshly built executable. How this is achieved? Have a look at the file included below+So - you like it, you say.. I guess it's good, isn't it? If you need the extra finctionality, you can easily (who could have guessed :-)) add it using for example new make targets stored in additional files, which names end with ".mk". One of such examples, which the author of this words had a need for, is creating and populating disk images before test running the freshly built executable. How this is achieved? Have a look at the short file below
 <file Make Makefile_disks.mk> <file Make Makefile_disks.mk>
 +G64DISK=$(basename $(PROGRAM)).g64
 +D64DISK=$(basename $(PROGRAM)).d64
 +ALLDISKS=$(G64DISK) $(D64DISK)
 +
 PREFSFILE=$(basename $(PROGRAM)).prefs PREFSFILE=$(basename $(PROGRAM)).prefs
 +DRIVERS=d0rs.drv s0rs.drv
 +ALLFILES=$(PROGRAM) $(DRIVERS) $(PREFSFILE)
  
-D64DISK=$(PROGRAM).d64 +REMOVES += $(ALLDISKS)
-D71DISK=$(PROGRAM).d71 +
-D81DISK=$(PROGRAM).d81 +
- +
-REMOVES += $(D64DISK) $(D71DISK) $(D81DISK)+
  
 .PHONY: disks .PHONY: disks
-disks: $(PROGRAM$(D64DISK) $(D71DISK) $(D81DISK) +disks: $(ALLDISKS)
- +
- +
-$(D64DISK): +
- c1541 -format $(PROGRAM),00 d64 $(D64DISK) +
- c1541 $(D64DISK) -delete $(PROGRAM) -delete $(PREFSFILE) +
- c1541 -attach $(D64DISK) -write $(PROGRAM) -write src/$(PREFSFILE) $(PREFSFILE),s +
- +
-$(D71DISK): +
- c1541 -format $(PROGRAM),01 d71 $(D71DISK) +
- c1541 $(D71DISK) -delete $(PROGRAM) -delete $(PREFSFILE) +
- c1541 -attach $(D71DISK) -write $(PROGRAM) -write src/$(PREFSFILE) $(PREFSFILE),s+
  
-$(D81DISK): +$(ALLDISKS): $(ALLFILES) 
- c1541 -format $(PROGRAM),01 d81 $(D81DISK) + c1541 -format $(basename $(PROGRAM)),00 $(subst .,,$(suffix $@)) $@ 
- c1541 $(D81DISK) -delete $(PROGRAM-delete $(PREFSFILE) + for file in $(ALLFILES; do c1541 $-write $$file ; done
- c1541 -attach $(D81DISK-write $(PROGRAM) -write src/$(PREFSFILE) $(PREFSFILE),s+
 </file> </file>
 It shows by example what you need to do in order to efficiently accommodate additional functionality without touching the main Makefile: It shows by example what you need to do in order to efficiently accommodate additional functionality without touching the main Makefile:
cc65/project_grows.txt · Last modified: 2013-03-03 18:51 by silverdr
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki