mirror of
https://github.com/wiiu-env/wut.git
synced 2025-01-05 21:58:14 +01:00
Add .rpx build rule.
This commit is contained in:
parent
e781efe156
commit
747be9e29e
@ -47,8 +47,6 @@ endif
|
||||
@echo "[AR] $(notdir $@)"
|
||||
@$(AR) -rcs $@ $^
|
||||
|
||||
%.elf:
|
||||
%.elf: $(OFILES)
|
||||
@echo "[LD] $(notdir $@)"
|
||||
@echo "[LD] $(LIBPATHS)"
|
||||
@echo "[LD] $(LDFLAGS)"
|
||||
@$(LD) -v $^ $(LIBPATHS) $(LIBS) $(LDFLAGS) -o $@
|
||||
@$(LD) $^ $(LIBPATHS) $(LIBS) $(LDFLAGS) -o $@
|
||||
|
@ -2,11 +2,10 @@ LIBPATHS := -L$(WUT_ROOT)/lib
|
||||
CFLAGS := -I$(WUT_ROOT)/include -fno-builtin -ffreestanding
|
||||
CXXFLAGS := $(CFLAGS)
|
||||
LDFLAGS := -nostdlib -nostartfiles $(WUT_ROOT)/lib/crt0.o -T $(WUT_ROOT)/rules/rpl.ld -pie -fPIE -z common-page-size=64 -z max-page-size=64
|
||||
ELF2RPL := $(WUT_ROOT)/bin/elf2rpl
|
||||
|
||||
include $(WUT_ROOT)/rules/base.mk
|
||||
|
||||
%.rpx: %.elf
|
||||
@$(STRIP) $< -o $(BUILDDIR)/$(notdir $<)
|
||||
|
||||
%.rpl: %.elf
|
||||
@$(STRIP) $< -o $(BUILDDIR)/$(notdir $<)
|
||||
@echo "[RPX] $(notdir $@)"
|
||||
@$(ELF2RPL) $(BUILDDIR)/$(notdir $<) $@
|
||||
|
@ -22,7 +22,7 @@ ifneq ($(BUILD),$(notdir $(CURDIR)))
|
||||
export OUTPUT := $(CURDIR)/$(TARGET)
|
||||
export VPATH := $(foreach dir,$(SOURCE),$(CURDIR)/$(dir)) \
|
||||
$(foreach dir,$(DATA),$(CURDIR)/$(dir))
|
||||
export BUILDDIR := $(CURDIR)/$(BUILD)
|
||||
export BUILDDIR := $(CURDIR)
|
||||
export DEPSDIR := $(BUILDDIR)
|
||||
|
||||
CFILES := $(foreach dir,$(SOURCE),$(notdir $(wildcard $(dir)/*.c)))
|
||||
@ -55,6 +55,7 @@ else
|
||||
|
||||
DEPENDS := $(OFILES:.o=.d)
|
||||
|
||||
$(OUTPUT).rpx: $(OUTPUT).elf
|
||||
$(OUTPUT).elf: $(OFILES)
|
||||
|
||||
-include $(DEPENDS)
|
||||
|
Loading…
Reference in New Issue
Block a user