diff options
Diffstat (limited to 'Source/Makefile')
| -rw-r--r-- | Source/Makefile | 35 |
1 files changed, 17 insertions, 18 deletions
diff --git a/Source/Makefile b/Source/Makefile index 1567492..dfe4290 100644 --- a/Source/Makefile +++ b/Source/Makefile @@ -39,13 +39,9 @@ OBJECTS = $(addprefix $(OBJ_DIR)/,main.o System.o Menu.o Gfx.o Pad.o MainMenuBtn DEPS = $(OBJECTS:.o=.d) -all: levels image +build: levels $(PROJECT).bin -rebuild: clean all - -build: $(PROJECT).exe - -objects: $(OBJECTS) +rebuild: clean build -include $(DEPS) @@ -57,24 +53,27 @@ clean: $(OBJ_DIR)/%.o: $(SRC_DIR)/%.c $(OBJ_DIR)/%.d $(CC) $< -o $@ $(DEFINE) $(CC_FLAGS) -MMD -$(PROJECT).elf: objects +$(PROJECT).elf: $(OBJECTS) $(LINKER) Obj/*.o -o Exe/$(PROJECT).elf $(LIBS) -Wl,--gc-sections - -$(PROJECT).exe: $(PROJECT).elf - $(ELF2EXE) Exe/$(PROJECT).elf Exe/$(PROJECT).exe $(ELF2EXE_FLAGS) - cp Exe/$(PROJECT).exe ../cdimg - -image: build - rm -f $(PROJECT).iso $(PROJECT).bin - rm -f $(PROJECT).cue + +$(PROJECT).iso: $(PROJECT).exe +# rm -f $@ mkisofs -o $(PROJECT).iso -V $(PROJECT) -sysid PLAYSTATION ../cdimg + +$(PROJECT).bin: $(PROJECT).iso + rm -f $@ + rm -f $(PROJECT).cue mkpsxiso $(PROJECT).iso $(PROJECT).bin $(LICENSE_FILE) $(MUSIC_TRACKS) - mv $(PROJECT).bin ../Bin +# $(PROJECT).cue is automatically generated by mkpsxiso + rm -f $^ + mv $@ ../Bin mv $(PROJECT).cue ../Bin - rm -f $(PROJECT).cue - rm -f $(PROJECT).iso $(GNU_SIZE) Exe/$(PROJECT).elf +$(PROJECT).exe: $(PROJECT).elf + $(ELF2EXE) Exe/$(PROJECT).elf Exe/$(PROJECT).exe $(ELF2EXE_FLAGS) + cp Exe/$(PROJECT).exe ../cdimg + emulator: export PATH=$$PATH:$(EMULATOR_DIR) $(EMULATOR) -cdfile $(PROJECT_DIR)/Bin/$(PROJECT).bin $(EMULATOR_FLAGS) |
