Moved convert.system from geos-apple to apple2[enh].

The target util convert.system is to be used in conjunction with GEOS on the Apple II but has to be built as an "ordinary" Apple II program. The way the cc65 library build system is designed there's no way to define dependencies between targets. The solution used so far was to explicitly trigger a build of the target 'apple2enh' from the target 'geos-apple'. However, that approach tends to break parallel builds which may be in the middle of building 'appple2enh' at the time it is triggered by 'geos-apple'.

There might be ways to get this fixed - but the the cc65 library build systrem is already (more than) complex enough, so I really don't want to add anything special to it.

On the other hand there are easier ways (outside the scope of cc65) to archive what convert.system does so I don't presume convert.system to be actually used - it's more a reference type of thing.

Putting all facts together the decision was easy: Just move convert.system from the target it is used with to the target(s) it is built with.
This commit is contained in:
Oliver Schmidt 2021-02-17 10:49:53 +01:00
parent b12758fe53
commit 3a7282544e
4 changed files with 11 additions and 18 deletions

View File

@ -133,8 +133,7 @@ MKINC = $(GEOS) \
TARGETUTIL = apple2 \
apple2enh \
atari \
geos-apple
atari
GEOSDIRS = common \
conio \

View File

@ -1,9 +1,17 @@
DEPS += ../libwrk/$(TARGET)/loader.d
DEPS += ../libwrk/$(TARGET)/convert.d \
../libwrk/$(TARGET)/loader.d
../libwrk/$(TARGET)/convert.o: $(SRCDIR)/targetutil/convert.c | ../libwrk/$(TARGET)
$(COMPILE_recipe)
../libwrk/$(TARGET)/loader.o: $(SRCDIR)/targetutil/loader.s | ../libwrk/$(TARGET)
$(ASSEMBLE_recipe)
../target/$(TARGET)/util/convert.system: ../libwrk/$(TARGET)/convert.o ../lib/$(TARGET).lib | ../target/$(TARGET)/util
$(LD65) -o $@ -C $(TARGET)-system.cfg $^
../target/$(TARGET)/util/loader.system: ../libwrk/$(TARGET)/loader.o $(SRCDIR)/targetutil/loader.cfg | ../target/$(TARGET)/util
$(LD65) -o $@ -C $(filter %.cfg,$^) $(filter-out %.cfg,$^)
$(TARGET): ../target/$(TARGET)/util/loader.system
$(TARGET): ../target/$(TARGET)/util/convert.system \
../target/$(TARGET)/util/loader.system

View File

@ -1,14 +0,0 @@
DEPS += ../libwrk/$(TARGET)/convert.d
../libwrk/$(TARGET)/convert.o: TARGET = apple2enh
../libwrk/$(TARGET)/convert.o: $(SRCDIR)/targetutil/convert.c | ../libwrk/$(TARGET)
$(COMPILE_recipe)
../lib/apple2enh.lib:
@$(MAKE) --no-print-directory apple2enh
../target/$(TARGET)/util/convert.system: ../libwrk/$(TARGET)/convert.o ../lib/apple2enh.lib | ../target/$(TARGET)/util
$(LD65) -o $@ -C apple2enh-system.cfg $^
$(TARGET): ../target/$(TARGET)/util/convert.system