|
@@ -42,6 +42,7 @@ MAPMAPS := $(MAPROOT)/maps
|
42
|
42
|
MAPTS := $(MAPROOT)/tileset
|
43
|
43
|
MAP_PROJ := $(MAPROOT)/sots.json
|
44
|
44
|
SCRIPTROOT := $(MAPROOT)/script
|
|
45
|
+PDATAROOT := sots-private/data
|
45
|
46
|
|
46
|
47
|
MAIN_OBJ := $(BLDPATH)/linked.o
|
47
|
48
|
B_ENGINE := battle_engine/build/linked.o
|
|
@@ -73,6 +74,7 @@ DATA_SRC := $(call rwildcard,data/,*.s)
|
73
|
74
|
STRING := $(call rwildcard,string/$(LAN)/,*.txt)
|
74
|
75
|
STRING_SRC := $(STRING:%.txt=%.s)
|
75
|
76
|
SCRIPT_SRC := $(call rwildcard,$(SCRIPTROOT)/,*.s)
|
|
77
|
+PDATA_SRC := $(call rwildcard,$(PDATAROOT)/,*.c)
|
76
|
78
|
|
77
|
79
|
MAP_PROJ_S := $(MAP_PROJ:%.json=%.s)
|
78
|
80
|
MAP_PROJ_O := $(MAP_PROJ:%.json=$(BLDPATH)/%.o)
|
|
@@ -91,7 +93,8 @@ ASM_OBJ := $(ASM_SRC:%.s=$(BLDPATH)/%.o)
|
91
|
93
|
C_OBJ := $(C_SRC:%.c=$(BLDPATH)/%.o)
|
92
|
94
|
DATA_OBJ := $(DATA_SRC:%.s=$(BLDPATH)/%.o)
|
93
|
95
|
SCRIPT_OBJ := $(SCRIPT_SRC:%.s=$(BLDPATH)/%.o)
|
94
|
|
-ALL_OBJ := $(GEN_OBJ) $(C_OBJ) $(ASM_OBJ) $(DATA_OBJ) $(STRING_OBJ) $(SCRIPT_OBJ) $(MAP_PROJ_O) $(MAP_FILES_O) $(TS_FILES_O) $(TS_GEN_O)
|
|
96
|
+PDATA_OBJ := $(PDATA_SRC:%.c=$(BLDPATH)/%.o)
|
|
97
|
+ALL_OBJ := $(GEN_OBJ) $(C_OBJ) $(ASM_OBJ) $(DATA_OBJ) $(STRING_OBJ) $(SCRIPT_OBJ) $(MAP_PROJ_O) $(MAP_FILES_O) $(TS_FILES_O) $(TS_GEN_O) $(PDATA_OBJ)
|
95
|
98
|
|
96
|
99
|
$(MAPMAPS)/%.s: $(MAPMAPS)/%.pmh
|
97
|
100
|
@printf "\e[1;33mGenerating map\e[0m $<\n"
|
|
@@ -101,9 +104,14 @@ $(MAPTS)/%.s: $(MAPTS)/%.pts
|
101
|
104
|
@printf "\e[1;33mGenerating tileset\e[0m $<\n"
|
102
|
105
|
$(PYSETS) -o $@ $<
|
103
|
106
|
|
104
|
|
-$(STRINGDIR)/%.s: $(STRINGDIR)/%.txt
|
105
|
|
- @printf "\e[1;36mGenerating strings\e[0m $<\n"
|
106
|
|
- $(STRAGB) -o $@ -i $< -t string/table.tbl -e 0xFF
|
|
107
|
+$(BLDPATH)/sots-private/data/%.o: $(PDATAROOT)/%.c
|
|
108
|
+ @printf "\e[1;31mCompiling\e[0m $<\n"
|
|
109
|
+ $(shell mkdir -p $(dir $@))
|
|
110
|
+ $(CC) $(CFLAGS) -E -x c $< -o $(PDATAROOT)/$*.i
|
|
111
|
+ $(PREPROC) $(PDATAROOT)/$*.i $(CHARMAP) > $(PDATAROOT)/$*.ci
|
|
112
|
+ $(CC) $(CFLAGS) -c -x c $(PDATAROOT)/$*.ci -o $@
|
|
113
|
+ @rm -f $(PDATAROOT)/$*.ci $(PDATAROOT)/$*.i
|
|
114
|
+
|
107
|
115
|
|
108
|
116
|
$(BLDPATH)/%.o: %.c $(ASSETS) $(PAGB_INCLUDE)/pokeagb/pokeagb.h
|
109
|
117
|
@printf "\e[1;31mCompiling\e[0m $<\n"
|