-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
34 lines (23 loc) · 862 Bytes
/
Makefile
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
TARGET = doukutsu
TYPE = ps-exe
LTOFLAGS ?= -flto
CFLAGS := -Isrc -Inugget/psyq/include
CFLAGS += -Wall -Wno-missing-braces -mno-check-zero-division
LDFLAGS := -Lnugget/psyq/lib -Wl,--start-group -lcard -lapi -lc2 -lcd -letc -lgpu -lspu -Wl,--end-group
LDFLAGS += $(LTOFLAGS)
SRCDIR = src
SRCSUB = engine game game/npc_act game/boss_act
SRCDIRS = $(foreach dir,$(SRCSUB),$(SRCDIR)/$(dir)) $(SRCDIR)
CFILES = $(foreach dir,$(SRCDIRS),$(wildcard $(dir)/*.c))
CPPFILES = $(foreach dir,$(SRCDIRS),$(wildcard $(dir)/*.cpp))
AFILES = $(foreach dir,$(SRCDIRS),$(wildcard $(dir)/*.s))
SRCS = $(CFILES) $(CPPFILES) $(AFILES)
SRCS += nugget/common/crt0/crt0.s
default: all
iso: $(TARGET).iso
$(TARGET).iso: all
mkpsxiso -y -q iso.xml
.PHONY: iso
include nugget/common.mk
CPPFLAGS_Release += -O3 $(LTOFLAGS)
LDFLAGS_Release += -O3 $(LTOFLAGS)