mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-26 03:34:15 +01:00
Optimize Makefile, also add *.sna to gitignore.
This commit is contained in:
parent
5029c90979
commit
68b53c7437
1
.gitignore
vendored
1
.gitignore
vendored
@ -33,3 +33,4 @@ porymap.project.cfg
|
|||||||
.vscode/
|
.vscode/
|
||||||
*.a
|
*.a
|
||||||
.fuse_hidden*
|
.fuse_hidden*
|
||||||
|
*.sna
|
||||||
|
4
Makefile
4
Makefile
@ -137,8 +137,7 @@ ASM_SRCS := $(wildcard $(ASM_SUBDIR)/*.s)
|
|||||||
ASM_OBJS := $(patsubst $(ASM_SUBDIR)/%.s,$(ASM_BUILDDIR)/%.o,$(ASM_SRCS))
|
ASM_OBJS := $(patsubst $(ASM_SUBDIR)/%.s,$(ASM_BUILDDIR)/%.o,$(ASM_SRCS))
|
||||||
|
|
||||||
# get all the data/*.s files EXCEPT the ones with specific rules
|
# get all the data/*.s files EXCEPT the ones with specific rules
|
||||||
REGULAR_DATA_ASM_SRCS := $(wildcard $(DATA_ASM_SUBDIR)/*.s)
|
REGULAR_DATA_ASM_SRCS := $(filter-out $(DATA_ASM_SUBDIR)/maps.s $(DATA_ASM_SUBDIR)/map_events.s, $(wildcard $(DATA_ASM_SUBDIR)/*.s))
|
||||||
REGULAR_DATA_ASM_SRCS := $(filter-out $(DATA_ASM_SUBDIR)/maps.s $(DATA_ASM_SUBDIR)/map_events.s, $(REGULAR_DATA_ASM_SRCS))
|
|
||||||
|
|
||||||
DATA_ASM_SRCS := $(wildcard $(DATA_ASM_SUBDIR)/*.s)
|
DATA_ASM_SRCS := $(wildcard $(DATA_ASM_SUBDIR)/*.s)
|
||||||
DATA_ASM_OBJS := $(patsubst $(DATA_ASM_SUBDIR)/%.s,$(DATA_ASM_BUILDDIR)/%.o,$(DATA_ASM_SRCS))
|
DATA_ASM_OBJS := $(patsubst $(DATA_ASM_SUBDIR)/%.s,$(DATA_ASM_BUILDDIR)/%.o,$(DATA_ASM_SRCS))
|
||||||
@ -301,6 +300,7 @@ $(DATA_ASM_BUILDDIR)/%.o: $(DATA_ASM_SUBDIR)/%.s
|
|||||||
else
|
else
|
||||||
define DATA_ASM_DEP
|
define DATA_ASM_DEP
|
||||||
$1: $2 $$(shell $(SCANINC) -I include -I "" $2)
|
$1: $2 $$(shell $(SCANINC) -I include -I "" $2)
|
||||||
|
#echo "hello"
|
||||||
$$(PREPROC) $$< charmap.txt | $$(CPP) -I include | $$(AS) $$(ASFLAGS) -o $$@
|
$$(PREPROC) $$< charmap.txt | $$(CPP) -I include | $$(AS) $$(ASFLAGS) -o $$@
|
||||||
endef
|
endef
|
||||||
$(foreach src, $(REGULAR_DATA_ASM_SRCS), $(eval $(call DATA_ASM_DEP,$(patsubst $(DATA_ASM_SUBDIR)/%.s,$(DATA_ASM_BUILDDIR)/%.o, $(src)),$(src))))
|
$(foreach src, $(REGULAR_DATA_ASM_SRCS), $(eval $(call DATA_ASM_DEP,$(patsubst $(DATA_ASM_SUBDIR)/%.s,$(DATA_ASM_BUILDDIR)/%.o, $(src)),$(src))))
|
||||||
|
Loading…
Reference in New Issue
Block a user