-
Notifications
You must be signed in to change notification settings - Fork 0
/
3ds_rules
45 lines (36 loc) · 1.37 KB
/
3ds_rules
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
ifeq ($(strip $(DEVKITPRO)),)
$(error "Please set DEVKITPRO in your environment. export DEVKITPRO=<path to>devkitPro)
endif
PORTLIBS := $(PORTLIBS_PATH)/armv6k $(PORTLIBS_PATH)/3ds
CTRULIB ?= $(DEVKITPRO)/libctru
ifeq ($(strip $(APP_TITLE)),)
APP_TITLE := $(notdir $(OUTPUT))
endif
ifeq ($(strip $(APP_DESCRIPTION)),)
APP_DESCRIPTION := Built with devkitARM & libctru
endif
ifeq ($(strip $(APP_AUTHOR)),)
APP_AUTHOR := Unspecified Author
endif
ifeq ($(strip $(APP_ICON)),)
APP_ICON := $(CTRULIB)/default_icon.png
endif
#---------------------------------------------------------------------------------
%.smdh: $(APP_ICON) $(MAKEFILE_LIST)
@smdhtool --create "$(APP_TITLE)" "$(APP_DESCRIPTION)" "$(APP_AUTHOR)" $(APP_ICON) $@
@echo built ... $(notdir $@)
#---------------------------------------------------------------------------------
%.3dsx: %.elf
@3dsxtool $< $@ $(_3DSXFLAGS)
@echo built ... $(notdir $@)
#---------------------------------------------------------------------------------
%.elf:
@echo linking $(notdir $@)
@$(CXX) $(LDFLAGS) $(OFILES) $(LIBPATHS) $(LIBS) -o $@
@$(NM) -CSn $@ > $(notdir $*.lst)
#---------------------------------------------------------------------------------
%.3gx: %.elf
@echo creating $(notdir $@)
@$(OBJCOPY) -O binary $(OUTPUT).elf $(TOPDIR)/objdump -S
@3gxtool.exe -s $(TOPDIR)/objdump $(TOPDIR)/$(PLGINFO) $@
@- rm $(TOPDIR)/objdump