14 lines
615 B
Makefile
14 lines
615 B
Makefile
#We use the JabyEngine so we will include ourselves
|
|
JABY_ENGINE_LIB_DIR = $(JABY_ENGINE_DIR)/lib/PSX-$(BUILD_PROFILE)
|
|
JABY_ENGINE_LIB_NAME = JabyEngine
|
|
|
|
#Linking rule
|
|
$(TARGET).elf: $(OBJS) $(JABY_ENGINE_LIB_DIR)/lib$(JABY_ENGINE_LIB_NAME).a
|
|
$(LD) -o $(TARGET).elf $(LDFLAGS_all) $(LDFLAGS) $(OBJS) -L$(JABY_ENGINE_LIB_DIR) -l$(JABY_ENGINE_LIB_NAME) $(LIBS)
|
|
|
|
#Strips the psexe
|
|
$(TARGET).psexe: $(TARGET).elf
|
|
$(PREFIX)-objcopy $(addprefix -R , $(OVERLAYSECTION)) -O binary $< $@
|
|
|
|
#Rules section for default compilation and linking
|
|
all: $(TARGET).psexe $(foreach ovl, $(OVERLAYSECTION), $(OUTPUT_DIR)Overlay$(ovl)) |