Browse Source

fix make rules

SBird1337 7 years ago
parent
commit
1b7c8d2da0
2 changed files with 13 additions and 1 deletions
  1. 1
    1
      battle_engine
  2. 12
    0
      makefile

+ 1
- 1
battle_engine

1
-Subproject commit a201b518834f0208efdb82ac95b08675f5279950
1
+Subproject commit 4a4fb7ac2ac3def1d4270796bdd2c04e8231d382

+ 12
- 0
makefile View File

105
 	@echo -e "\e[93mGenerating strings $<\e[0m"
105
 	@echo -e "\e[93mGenerating strings $<\e[0m"
106
 	$(STRAGB) -o $@ -i $< -t string/table.tbl -e 0xFF
106
 	$(STRAGB) -o $@ -i $< -t string/table.tbl -e 0xFF
107
 
107
 
108
+$(BLDPATH)/%.o: %.c $(ASSETS) $(PAGB_INCLUDE)/pokeagb/pokeagb.h src/include/script_language.h	
109
+	@echo -e "\e[32mCompiling $<\e[0m"		
110
+	$(shell mkdir -p $(dir $@))		
111
+	$(CC) $(CFLAGS) -c $< -o $@		
112
+		
113
+$(BLDPATH)/%.o: %.s $(PAGB_INCLUDE)/pokeagb/pokeagb.h src/include/script_language.h	
114
+	@echo -e "\e[32mAssembling $<\e[0m"		
115
+	$(shell mkdir -p $(dir $@))		
116
+	$(PREPROC) $< $(CHARMAP) > $*.i		
117
+	$(CC) $(CFLAGS) -c -x assembler-with-cpp $*.i -o $@		
118
+	@rm -f $*.i
119
+
108
 $(MAPTS)/%.s: $(MAPTS)/%.png
120
 $(MAPTS)/%.s: $(MAPTS)/%.png
109
 	@echo -e "\e[34mProcessing image (tileset) $<\e[0m"
121
 	@echo -e "\e[34mProcessing image (tileset) $<\e[0m"
110
 	$(GRIT) $< -o $@ -fts -gzl -pz! -pu16 -gB4 -m! -mR!
122
 	$(GRIT) $< -o $@ -fts -gzl -pz! -pu16 -gB4 -m! -mR!