example Makefiles: use Rez instead of MakeAPPL

This commit is contained in:
Wolfgang Thaller 2015-07-21 23:40:07 +02:00
parent 03a2a6d215
commit d95202ca50
2 changed files with 25 additions and 7 deletions

View File

@ -1,15 +1,21 @@
# path to RETRO68 # path to RETRO68
RETRO68=../../Retro68-build/toolchain RETRO68=../../../Retro68-build/toolchain
PREFIX=$(RETRO68)/m68k-unknown-elf PREFIX=$(RETRO68)/m68k-unknown-elf
CC=$(RETRO68)/bin/m68k-unknown-elf-gcc CC=$(RETRO68)/bin/m68k-unknown-elf-gcc
CXX=$(RETRO68)/bin/m68k-unknown-elf-g++ CXX=$(RETRO68)/bin/m68k-unknown-elf-g++
MAKEAPPL=$(RETRO68)/bin/MakeAPPL REZ=$(RETRO68)/bin/Rez
LDFLAGS=-lRetroConsole LDFLAGS=-lRetroConsole
RINCLUDES=$(PREFIX)/RIncludes
REZFLAGS=-I$(RINCLUDES)
HelloWorld.bin HelloWorld.APPL HelloWorld.dsk: HelloWorld.flt HelloWorld.bin HelloWorld.APPL HelloWorld.dsk: HelloWorld.flt
$(MAKEAPPL) -c HelloWorld.flt -o HelloWorld $(REZ) $(REZFLAGS) \
-DFLT_FILE_NAME="\"HelloWorld.flt\"" "$(RINCLUDES)/Retro68APPL.r" \
-t "APPL" -c "????" \
-o HelloWorld.bin --cc HelloWorld.APPL --cc HelloWorld.dsk
HelloWorld.flt: hello.o HelloWorld.flt: hello.o
$(CXX) $< -o $@ $(LDFLAGS) # C++ used for linking because RetroConsole needs it $(CXX) $< -o $@ $(LDFLAGS) # C++ used for linking because RetroConsole needs it

View File

@ -2,15 +2,18 @@
# Double-check RETRO68 variable below and run 'make'. # Double-check RETRO68 variable below and run 'make'.
# path to RETRO68 # path to RETRO68
RETRO68=../../Retro68-build/toolchain RETRO68=../../../Retro68-build/toolchain
PREFIX=$(RETRO68)/m68k-unknown-elf PREFIX=$(RETRO68)/m68k-unknown-elf
CC=$(RETRO68)/bin/m68k-unknown-elf-gcc CC=$(RETRO68)/bin/m68k-unknown-elf-gcc
CXX=$(RETRO68)/bin/m68k-unknown-elf-g++ CXX=$(RETRO68)/bin/m68k-unknown-elf-g++
REZ=$(RETRO68)/bin/Rez
MAKEAPPL=$(RETRO68)/bin/MakeAPPL MAKEAPPL=$(RETRO68)/bin/MakeAPPL
CXXFLAGS=-std=c++11 CXXFLAGS=-std=c++11
LDFLAGS=-Wl,-gc-sections -lm LDFLAGS=-Wl,-gc-sections -lm
RINCLUDES=$(PREFIX)/RIncludes
REZFLAGS=-I$(RINCLUDES)
all: Raytracer.bin Raytracer2.bin FixedBenchmark.bin all: Raytracer.bin Raytracer2.bin FixedBenchmark.bin
.PHONY: all clean .PHONY: all clean
@ -22,19 +25,28 @@ clean:
rm -f fixed.o raytracer.o raytracer2.o fixedbenchmark.o rm -f fixed.o raytracer.o raytracer2.o fixedbenchmark.o
Raytracer.bin Raytracer.APPL Raytracer.dsk: Raytracer.flt Raytracer.bin Raytracer.APPL Raytracer.dsk: Raytracer.flt
$(MAKEAPPL) -c Raytracer.flt -o Raytracer $(REZ) $(REZFLAGS) \
-DFLT_FILE_NAME="\"Raytracer.flt\"" "$(RINCLUDES)/Retro68APPL.r" \
-t "APPL" -c "????" \
-o Raytracer.bin --cc Raytracer.APPL --cc Raytracer.dsk
Raytracer.flt: raytracer.o Raytracer.flt: raytracer.o
$(CC) $^ -o $@ $(LDFLAGS) $(CC) $^ -o $@ $(LDFLAGS)
Raytracer2.bin Raytracer2.APPL Raytracer2.dsk: Raytracer2.flt Raytracer2.bin Raytracer2.APPL Raytracer2.dsk: Raytracer2.flt
$(MAKEAPPL) -c Raytracer2.flt -o Raytracer2 $(REZ) $(REZFLAGS) \
-DFLT_FILE_NAME="\"Raytracer2.flt\"" "$(RINCLUDES)/Retro68APPL.r" \
-t "APPL" -c "????" \
-o Raytracer2.bin --cc Raytracer2.APPL --cc Raytracer2.dsk
Raytracer2.flt: raytracer2.o fixed.o Raytracer2.flt: raytracer2.o fixed.o
$(CXX) $^ -o $@ $(LDFLAGS) $(CXX) $^ -o $@ $(LDFLAGS)
FixedBenchmark.bin FixedBenchmark.APPL FixedBenchmark.dsk: FixedBenchmark.flt FixedBenchmark.bin FixedBenchmark.APPL FixedBenchmark.dsk: FixedBenchmark.flt
$(MAKEAPPL) -c FixedBenchmark.flt -o FixedBenchmark $(REZ) $(REZFLAGS) \
-DFLT_FILE_NAME="\"FixedBenchmark.flt\"" "$(RINCLUDES)/Retro68APPL.r" \
-t "APPL" -c "????" \
-o FixedBenchmark.bin --cc FixedBenchmark.APPL --cc FixedBenchmark.dsk
FixedBenchmark.flt: fixedbenchmark.o fixed.o FixedBenchmark.flt: fixedbenchmark.o fixed.o
$(CXX) $^ -o $@ -lRetroConsole $(LDFLAGS) $(CXX) $^ -o $@ -lRetroConsole $(LDFLAGS)