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