mirror of
https://github.com/switchbrew/libnx.git
synced 2025-06-21 12:32:40 +02:00
29 lines
870 B
Plaintext
29 lines
870 B
Plaintext
ifeq ($(strip $(DEVKITPRO)),)
|
|
$(error "Please set DEVKITPRO in your environment. export DEVKITPRO=<path to>devkitPro)
|
|
endif
|
|
|
|
include $(DEVKITA64)/base_rules
|
|
|
|
PORTLIBS := $(PORTLIBS_PATH)/armv8-a $(PORTLIBS_PATH)/switch
|
|
|
|
LIBNX ?= $(DEVKITPRO)/libnx
|
|
|
|
#---------------------------------------------------------------------------------
|
|
%.pfs0: %.nso
|
|
@mkdir -p exefs
|
|
@[ -d $(BUILD_EXEFS_SRC) ] && cp -R $(BUILD_EXEFS_SRC)/* exefs || echo > /dev/null
|
|
@cp $< exefs/main
|
|
@build_pfs0 exefs $@
|
|
@echo built ... $(notdir $@)
|
|
|
|
#---------------------------------------------------------------------------------
|
|
%.nso: %.elf
|
|
@elf2nso $< $@
|
|
@echo built ... $(notdir $@)
|
|
|
|
#---------------------------------------------------------------------------------
|
|
%.elf:
|
|
@echo linking $(notdir $@)
|
|
@$(LD) $(LDFLAGS) $(OFILES) $(LIBPATHS) $(LIBS) -o $@
|
|
@$(NM) -CSn $@ > $(notdir $*.lst)
|