Skip to content

Commit

Permalink
Merge branch 'build-cia' of git://github.com/WinterMute/ftbrony into …
Browse files Browse the repository at this point in the history
…build-cia
  • Loading branch information
mtheall committed Jun 9, 2016
2 parents ec17770 + f90c23e commit b242cfd
Show file tree
Hide file tree
Showing 11 changed files with 448 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .gitignore
@@ -1,8 +1,8 @@
build/
build.linux/
buildtools/
output/
ftpd
*.3dsx
*.cia
*.smdh
*.elf
11 changes: 8 additions & 3 deletions Makefile
@@ -1,10 +1,15 @@
.PHONY: all clean linux
.PHONY: all 3dsx cia clean linux

export VERSION := 2.2

all:
@$(MAKE) -f Makefile.3ds
all: 3dsx

3dsx:
@$(MAKE) -f Makefile.3ds 3dsx

cia:
@$(MAKE) -f Makefile.3ds cia

linux:
@$(MAKE) -f Makefile.linux

Expand Down
40 changes: 36 additions & 4 deletions Makefile.3ds
Expand Up @@ -37,7 +37,11 @@ ROMFS :=
APP_TITLE := Super ftpd II Turbo
APP_DESCRIPTION := v$(VERSION)
APP_AUTHOR := mtheall
ICON := ftpd.png

ICON := meta/icon.png
BNR_IMAGE := meta/banner.png
BNR_AUDIO := meta/audio.wav
RSF_FILE := meta/ftpd-cia.rsf

#---------------------------------------------------------------------------------
# options for code generation
Expand Down Expand Up @@ -131,15 +135,21 @@ endif

#---------------------------------------------------------------------------------
all: $(BUILD)
@make --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile.3ds

3dsx: $(BUILD)
@make --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile.3ds 3dsx

cia: $(BUILD)
@make --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile.3ds cia

$(BUILD):
@[ -d $@ ] || mkdir -p $@
@$(MAKE) --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile.3ds

#---------------------------------------------------------------------------------
clean:
@echo clean ...
@rm -fr $(BUILD) $(TARGET).3dsx $(OUTPUT).smdh $(TARGET).elf
@rm -fr $(BUILD) $(TARGET).3dsx $(OUTPUT).smdh $(TARGET).elf $(TARGET).cia output/


#---------------------------------------------------------------------------------
Expand All @@ -150,15 +160,37 @@ DEPENDS := $(OFILES:.o=.d)
#---------------------------------------------------------------------------------
# main targets
#---------------------------------------------------------------------------------
#all: $(OUTPUT).cia $(OUTPUT).3dsx

3dsx: $(OUTPUT).3dsx

cia: $(OUTPUT).cia

ifeq ($(strip $(NO_SMDH)),)
.PHONY: all
all : $(OUTPUT).3dsx $(OUTPUT).smdh
$(OUTPUT).smdh : $(TOPDIR)/Makefile
$(OUTPUT).smdh : $(TOPDIR)/Makefile.3ds
$(OUTPUT).3dsx: $(OUTPUT).smdh
endif

$(OUTPUT).3dsx: $(OUTPUT).elf
$(OUTPUT).elf: $(OFILES)

#$(OUTPUT).smdh : $(APP_ICON)
# @bannertool makesmdh -s "$(APP_TITLE)" -l "$(APP_DESCRIPTION)" -p "$(APP_AUTHOR)" -i $(APP_ICON) -o $@
# @echo "built ... $(notdir $@)"

$(OUTPUT).cia : $(OUTPUT).elf $(OUTPUT).smdh $(TARGET).bnr $(TOPDIR)/$(RSF_FILE)
@makerom -f cia -target t -exefslogo -o $@ \
-elf $(OUTPUT).elf -rsf $(TOPDIR)/$(RSF_FILE) \
-banner $(TARGET).bnr \
-icon $(OUTPUT).smdh
@echo "built ... $(notdir $@)"

$(TARGET).bnr : $(TOPDIR)/$(BNR_IMAGE) $(TOPDIR)/$(BNR_AUDIO)
@bannertool makebanner -o $@ -i $(TOPDIR)/$(BNR_IMAGE) -a $(TOPDIR)/$(BNR_AUDIO)
@echo "built ... $@"

#---------------------------------------------------------------------------------
# you need a rule like this for each extension you use as binary data
#---------------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion Makefile.linux
@@ -1,4 +1,4 @@
TARGET := $(notdir $(CURDIR))
TARGET := ftpd

CFILES := $(wildcard source/*.c)
OFILES := $(patsubst source/%,build.linux/%,$(CFILES:.c=.o))
Expand Down
Binary file removed ftpd.png
Binary file not shown.
Binary file added meta/audio.wav
Binary file not shown.
Binary file added meta/banner.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
88 changes: 88 additions & 0 deletions meta/banner.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit b242cfd

Please sign in to comment.