Added convenience make targets and refined documentation in the HelloPlayDate example target.
This commit is contained in:
@@ -28,4 +28,23 @@ OBJS += build/Modules/playdate_device.o
|
||||
build/game_simulator.o: Sources/HelloPlaydate/*.swift build/Modules/playdate_simulator.o
|
||||
$(SWIFT_EXEC) $(SWIFT_FLAGS) $(SWIFT_FLAGS_SIMULATOR) -c $(filter %.swift,$^) -o $@
|
||||
$(OBJDIR)/pdex.${DYLIB_EXT}: build/game_simulator.o
|
||||
SIMCOMPILER += build/game_simulator.o
|
||||
SIMCOMPILER += build/game_simulator.o
|
||||
|
||||
# MARK: - Convenience Targets
|
||||
# The SDK's common.mk (included via swift.mk) already provides the build
|
||||
# targets, all packaging $(PRODUCT) with pdc:
|
||||
# make device binary + simulator dylib (alias: all)
|
||||
# make simulator simulator dylib only
|
||||
# make device device binary only
|
||||
.PHONY: run clean-swiftpm
|
||||
|
||||
# Build the simulator flavor and launch the pdx in the Playdate Simulator.
|
||||
run: simulator
|
||||
open -a "$(SDK)/bin/Playdate Simulator.app" $(PRODUCT)
|
||||
|
||||
# common.mk's clean removes the build folder, $(PRODUCT), and the binaries
|
||||
# copied into Source/; also drop the .build folder SwiftPM leaves behind
|
||||
# when building with build.sh.
|
||||
clean: clean-swiftpm
|
||||
clean-swiftpm:
|
||||
-rm -rf .build
|
||||
Reference in New Issue
Block a user