forked from fortheusers/hb-appstore
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.wiiu
65 lines (55 loc) · 2.71 KB
/
Makefile.wiiu
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
BASEDIR := $(dir $(firstword $(MAKEFILE_LIST)))
VPATH := $(BASEDIR)
GET := ./libs/get/src
RAPIDJSON := ./libs/get/src/libs/rapidjson/include
MINIZIP := ./libs/get/src/libs/minizip
TINYXML := libs/get/src/libs/tinyxml
#---------------------------------------------------------------------------------
# TARGET is the name of the output
# BUILD is the directory where object files & intermediate files will be placed
# SOURCES is a list of directories containing source code
# INCLUDES is a list of directories containing header files
# ROMFS is a directory that will be available as romfs:/
#---------------------------------------------------------------------------------
TARGET := appstore
BUILD := build
SOURCES := . $(GET) $(MINIZIP) $(TINYXML) console gui
INCLUDES := -I. -I$(RAPIDJSON) -I$(MINIZIP) -I$(TINYXML)
ROMFS := romfs
#---------------------------------------------------------------------------------
# options for code generation
#---------------------------------------------------------------------------------
CFLAGS += -DUSE_FILE32API -DNOCRYPT -DINPUT_JOYSTICK -D_XOPEN_SOURCE $(INCLUDES)
CXXFLAGS += $(CFLAGS)
LDFLAGS += $(WUT_NEWLIB_LDFLAGS) $(WUT_STDCPP_LDFLAGS) $(WUT_DEVOPTAB_LDFLAGS) \
-lSDL2_ttf -lfreetype -lpng -lSDL2_gfx -lSDL2_image -lSDL2 -ljpeg -lzip \
-lcoreinit -lvpad -lsndcore2 -lzlib125 -lsysapp -lnsysnet -lnlibcurl -lproc_ui -lgx2 -lgfd -lwhb
#---------------------------------------------------------------------------------
# get a list of objects
#---------------------------------------------------------------------------------
CFILES := $(foreach dir,$(SOURCES),$(wildcard $(dir)/*.c))
CPPFILES := $(foreach dir,$(SOURCES),$(wildcard $(dir)/*.cpp))
SFILES := $(foreach dir,$(SOURCES),$(wildcard $(dir)/*.s))
OBJECTS := $(CPPFILES:.cpp=.o) $(CFILES:.c=.o) $(SFILES:.s=.o)
#---------------------------------------------------------------------------------
# objectives
#---------------------------------------------------------------------------------
ifneq ($(ROMFS),)
include $(DEVKITPRO)/portlibs/ppc/share/romfs-wiiu.mk
OBJECTS += $(ROMFS_TARGET)
endif
$(TARGET).rpx: $(OBJECTS)
clean:
rm -rf $(TARGET).rpx $(TARGET).rpx.elf $(OBJECTS) $(OBJECTS:.o=.d)
#---------------------------------------------------------------------------------
# wut
#---------------------------------------------------------------------------------
WUT_KEEP_RPLELF := 1
include $(WUT_ROOT)/share/wut.mk
#---------------------------------------------------------------------------------
# portlibs
#---------------------------------------------------------------------------------
PORTLIBS := $(DEVKITPRO)/portlibs/ppc
LDFLAGS += -L$(PORTLIBS)/lib
CFLAGS += -I$(PORTLIBS)/include
CXXFLAGS += -I$(PORTLIBS)/include