From 3d61f44cf729f52086a7ba166d6c77ed8f134576 Mon Sep 17 00:00:00 2001 From: jaby Date: Tue, 23 Aug 2022 20:13:39 +0200 Subject: [PATCH] Implement PSEXE Target as separated makefile --- lib/Makefile | 7 ------- lib/PSEXETarget.mk | 7 +++++++ 2 files changed, 7 insertions(+), 7 deletions(-) create mode 100644 lib/PSEXETarget.mk diff --git a/lib/Makefile b/lib/Makefile index f64e9557..f9ffeb47 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -79,13 +79,6 @@ $(OUTPUT_DIR)/%.o: $$(subst !super,..,%.s) @mkdir -p $(dir $@) $(CC) $(ARCHFLAGS) -I$(PCSX_REDUX) -g -c -o $@ $< -$(TARGET).elf: $(OBJS) - $(LD) -o $(TARGET).elf $(LDFLAGS_all) $(LDFLAGS) $(OBJS) $(LIBS_all) $(LIBS) - -#Strips the psexe -$(TARGET).psexe: $(TARGET).elf - $(PREFIX)-objcopy $(addprefix -R , $(OVERLAYSECTION)) -O binary $< $@ - #Rules section for default compilation and linking rebuild: $(MAKE) clean diff --git a/lib/PSEXETarget.mk b/lib/PSEXETarget.mk new file mode 100644 index 00000000..96ac9fa8 --- /dev/null +++ b/lib/PSEXETarget.mk @@ -0,0 +1,7 @@ +#Linking rule +$(TARGET).elf: $(OBJS) + $(LD) -o $(TARGET).elf $(LDFLAGS_all) $(LDFLAGS) $(OBJS) $(LIBS_all) $(LIBS) + +#Strips the psexe +$(TARGET).psexe: $(TARGET).elf + $(PREFIX)-objcopy $(addprefix -R , $(OVERLAYSECTION)) -O binary $< $@ \ No newline at end of file