Browse Source

add better dependency rules for some header files

SBird1337 7 years ago
parent
commit
bf04debba3
3 changed files with 7 additions and 10 deletions
  1. 3
    3
      makefile
  2. 3
    6
      src/interface/mugshot_table.s
  3. 1
    1
      src/interface/textbox_mugshots.c

+ 3
- 3
makefile View File

20
 export PATH := $(realpath ../tools):$(PATH)
20
 export PATH := $(realpath ../tools):$(PATH)
21
 
21
 
22
 PAGB_MAIN := g3headers
22
 PAGB_MAIN := g3headers
23
-PAGB_INCLUDE := $(PAGB_MAIN)/build/include/
23
+PAGB_INCLUDE := $(PAGB_MAIN)/build/include
24
 PAGB_LINK := $(PAGB_MAIN)/build/linker/BPRE.ld
24
 PAGB_LINK := $(PAGB_MAIN)/build/linker/BPRE.ld
25
 
25
 
26
 AUTO_ASSET_ROOT := sots-private/assets/images
26
 AUTO_ASSET_ROOT := sots-private/assets/images
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)
108
+$(BLDPATH)/%.o: %.c $(ASSETS) $(PAGB_INCLUDE)/pokeagb/pokeagb.h src/include/script_language.h src/include/hiddenflags.h
109
 	@echo -e "\e[32mCompiling $<\e[0m"
109
 	@echo -e "\e[32mCompiling $<\e[0m"
110
 	$(shell mkdir -p $(dir $@))
110
 	$(shell mkdir -p $(dir $@))
111
 	$(CC) $(CFLAGS) -c $< -o $@
111
 	$(CC) $(CFLAGS) -c $< -o $@
112
 
112
 
113
-$(BLDPATH)/%.o: %.s
113
+$(BLDPATH)/%.o: %.s $(PAGB_INCLUDE)/pokeagb/pokeagb.h src/include/script_language.h src/include/hiddenflags.h
114
 	@echo -e "\e[32mAssembling $<\e[0m"
114
 	@echo -e "\e[32mAssembling $<\e[0m"
115
 	$(shell mkdir -p $(dir $@))
115
 	$(shell mkdir -p $(dir $@))
116
 	$(PREPROC) $< $(CHARMAP) > $*.i
116
 	$(PREPROC) $< $(CHARMAP) > $*.i

+ 3
- 6
src/interface/mugshot_table.s View File

2
 .thumb
2
 .thumb
3
 .section .rodata
3
 .section .rodata
4
 
4
 
5
-mugshot_table_int:
5
+.global mugshots
6
+mugshots:
6
 .word mug_00Tiles
7
 .word mug_00Tiles
7
 .word mug_00Pal
8
 .word mug_00Pal
8
 
9
 
31
 .word mug_08Pal
32
 .word mug_08Pal
32
 
33
 
33
 .word mug_09Tiles
34
 .word mug_09Tiles
34
-.word mug_09Pal
35
-
36
-.global mugshots
37
-mugshots:
38
-.word mugshot_table_int
35
+.word mug_09Pal

+ 1
- 1
src/interface/textbox_mugshots.c View File

65
 
65
 
66
 /* === STATIC GLOBALS === */
66
 /* === STATIC GLOBALS === */
67
 
67
 
68
-extern mug_mugshot *mugshots;
68
+extern mug_mugshot mugshots[0xFF];
69
 
69
 
70
 u8 *temp_obj_id1 = (u8*) OBJ_1_TEMP;
70
 u8 *temp_obj_id1 = (u8*) OBJ_1_TEMP;
71
 u8 *temp_obj_id2 = (u8*) OBJ_2_TEMP;
71
 u8 *temp_obj_id2 = (u8*) OBJ_2_TEMP;