mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-11-16 19:47:35 +01:00
Quieter "make tools"
This commit is contained in:
parent
fd53bbc464
commit
6ff1426abe
32
Makefile
32
Makefile
@ -51,7 +51,7 @@ ROM := pokeemerald.gba
|
|||||||
OBJ_DIR := build/emerald
|
OBJ_DIR := build/emerald
|
||||||
LIBPATH := -L ../../tools/agbcc/lib
|
LIBPATH := -L ../../tools/agbcc/lib
|
||||||
else
|
else
|
||||||
CC1 := $(shell $(PREFIX)gcc --print-prog-name=cc1) -quiet
|
CC1 := $(shell $(CC) --print-prog-name=cc1) -quiet
|
||||||
override CFLAGS += -mthumb -mthumb-interwork -O2 -mabi=apcs-gnu -mtune=arm7tdmi -march=armv4t -fno-toplevel-reorder -fno-aggressive-loop-optimizations -Wno-pointer-to-int-cast
|
override CFLAGS += -mthumb -mthumb-interwork -O2 -mabi=apcs-gnu -mtune=arm7tdmi -march=armv4t -fno-toplevel-reorder -fno-aggressive-loop-optimizations -Wno-pointer-to-int-cast
|
||||||
ROM := pokeemerald_modern.gba
|
ROM := pokeemerald_modern.gba
|
||||||
OBJ_DIR := build/modern
|
OBJ_DIR := build/modern
|
||||||
@ -78,6 +78,12 @@ FIX := tools/gbafix/gbafix$(EXE)
|
|||||||
MAPJSON := tools/mapjson/mapjson$(EXE)
|
MAPJSON := tools/mapjson/mapjson$(EXE)
|
||||||
JSONPROC := tools/jsonproc/jsonproc$(EXE)
|
JSONPROC := tools/jsonproc/jsonproc$(EXE)
|
||||||
|
|
||||||
|
TOOLDIRS := $(filter-out tools/agbcc tools/binutils,$(wildcard tools/*))
|
||||||
|
TOOLBASE = $(TOOLDIRS:tools/%=%)
|
||||||
|
TOOLS = $(foreach tool,$(TOOLBASE),tools/$(tool)/$(tool)$(EXE))
|
||||||
|
|
||||||
|
MAKEFLAGS += --no-print-directory
|
||||||
|
|
||||||
# Clear the default suffixes
|
# Clear the default suffixes
|
||||||
.SUFFIXES:
|
.SUFFIXES:
|
||||||
# Don't delete intermediate files
|
# Don't delete intermediate files
|
||||||
@ -88,7 +94,17 @@ JSONPROC := tools/jsonproc/jsonproc$(EXE)
|
|||||||
# Secondary expansion is required for dependency variables in object rules.
|
# Secondary expansion is required for dependency variables in object rules.
|
||||||
.SECONDEXPANSION:
|
.SECONDEXPANSION:
|
||||||
|
|
||||||
.PHONY: rom clean compare tidy tools mostlyclean clean-tools
|
.PHONY: all rom clean compare tidy tools mostlyclean clean-tools $(TOOLDIRS)
|
||||||
|
|
||||||
|
infoshell = $(foreach line, $(shell $1 | sed "s/ /__SPACE__/g"), $(info $(subst __SPACE__, ,$(line))))
|
||||||
|
|
||||||
|
# Build tools when building the rom
|
||||||
|
# Disable dependency scanning for clean/tidy/tools
|
||||||
|
ifeq (,$(filter-out all compare,$(MAKECMDGOALS)))
|
||||||
|
$(call infoshell, $(MAKE) tools)
|
||||||
|
else
|
||||||
|
NODEP := 1
|
||||||
|
endif
|
||||||
|
|
||||||
C_SRCS := $(wildcard $(C_SUBDIR)/*.c $(C_SUBDIR)/*/*.c $(C_SUBDIR)/*/*/*.c)
|
C_SRCS := $(wildcard $(C_SUBDIR)/*.c $(C_SUBDIR)/*/*.c $(C_SUBDIR)/*/*/*.c)
|
||||||
C_OBJS := $(patsubst $(C_SUBDIR)/%.c,$(C_BUILDDIR)/%.o,$(C_SRCS))
|
C_OBJS := $(patsubst $(C_SUBDIR)/%.c,$(C_BUILDDIR)/%.o,$(C_SRCS))
|
||||||
@ -112,18 +128,14 @@ SUBDIRS := $(sort $(dir $(OBJS)))
|
|||||||
|
|
||||||
AUTO_GEN_TARGETS :=
|
AUTO_GEN_TARGETS :=
|
||||||
|
|
||||||
TOOLDIRS := $(filter-out tools/agbcc tools/binutils,$(wildcard tools/*))
|
|
||||||
TOOLBASE = $(TOOLDIRS:tools/%=%)
|
|
||||||
TOOLS = $(foreach tool,$(TOOLBASE),tools/%(tool)/$(tool)$(EXE))
|
|
||||||
|
|
||||||
$(shell mkdir -p $(SUBDIRS))
|
$(shell mkdir -p $(SUBDIRS))
|
||||||
|
|
||||||
all: tools rom
|
all: rom
|
||||||
|
|
||||||
tools: $(TOOLS)
|
tools: $(TOOLDIRS)
|
||||||
|
|
||||||
$(TOOLS):
|
$(TOOLDIRS):
|
||||||
@$(foreach tooldir,$(TOOLDIRS),$(MAKE) -C $(tooldir);)
|
@$(MAKE) -C $@
|
||||||
|
|
||||||
rom: $(ROM)
|
rom: $(ROM)
|
||||||
|
|
||||||
|
2
src/bg.c
2
src/bg.c
@ -220,7 +220,7 @@ static void ShowBgInternal(u8 bg)
|
|||||||
(sGpuBgConfigs.configs[bg].wraparound << 13) |
|
(sGpuBgConfigs.configs[bg].wraparound << 13) |
|
||||||
(sGpuBgConfigs.configs[bg].screenSize << 14);
|
(sGpuBgConfigs.configs[bg].screenSize << 14);
|
||||||
|
|
||||||
SetGpuReg((bg << 1) + 0x8, value);
|
SetGpuReg((bg << 1) + REG_OFFSET_BG0CNT, value);
|
||||||
|
|
||||||
sGpuBgConfigs.bgVisibilityAndMode |= 1 << (bg + 8);
|
sGpuBgConfigs.bgVisibilityAndMode |= 1 << (bg + 8);
|
||||||
sGpuBgConfigs.bgVisibilityAndMode &= DISPCNT_ALL_BG_AND_MODE_BITS;
|
sGpuBgConfigs.bgVisibilityAndMode &= DISPCNT_ALL_BG_AND_MODE_BITS;
|
||||||
|
@ -6,7 +6,10 @@ LIBS = -lm
|
|||||||
|
|
||||||
SRCS = main.c extended.c
|
SRCS = main.c extended.c
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: all clean
|
||||||
|
|
||||||
|
all: aif2pcm
|
||||||
|
@:
|
||||||
|
|
||||||
aif2pcm: $(SRCS)
|
aif2pcm: $(SRCS)
|
||||||
$(CC) $(CFLAGS) $(SRCS) -o $@ $(LDFLAGS) $(LIBS)
|
$(CC) $(CFLAGS) $(SRCS) -o $@ $(LDFLAGS) $(LIBS)
|
||||||
|
@ -2,10 +2,13 @@ CC = gcc
|
|||||||
|
|
||||||
CFLAGS = -Wall -Wextra -Werror -std=c11 -O2
|
CFLAGS = -Wall -Wextra -Werror -std=c11 -O2
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: all clean
|
||||||
|
|
||||||
SRCS = bin2c.c
|
SRCS = bin2c.c
|
||||||
|
|
||||||
|
all: bin2c
|
||||||
|
@:
|
||||||
|
|
||||||
bin2c: $(SRCS)
|
bin2c: $(SRCS)
|
||||||
$(CC) $(CFLAGS) $(SRCS) -o $@ $(LDFLAGS)
|
$(CC) $(CFLAGS) $(SRCS) -o $@ $(LDFLAGS)
|
||||||
|
|
||||||
|
@ -1,8 +1,11 @@
|
|||||||
CC = gcc
|
CC = gcc
|
||||||
.PHONY: clean
|
.PHONY: all clean
|
||||||
|
|
||||||
SRCS = gbafix.c
|
SRCS = gbafix.c
|
||||||
|
|
||||||
|
all: gbafix
|
||||||
|
@:
|
||||||
|
|
||||||
gbafix: $(SRCS)
|
gbafix: $(SRCS)
|
||||||
$(CC) $(SRCS) -o $@ $(LDFLAGS)
|
$(CC) $(SRCS) -o $@ $(LDFLAGS)
|
||||||
|
|
||||||
|
@ -8,7 +8,10 @@ SRCS := jsonproc.cpp
|
|||||||
|
|
||||||
HEADERS := jsonproc.h inja.hpp nlohmann/json.hpp
|
HEADERS := jsonproc.h inja.hpp nlohmann/json.hpp
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: all clean
|
||||||
|
|
||||||
|
all: jsonproc
|
||||||
|
@:
|
||||||
|
|
||||||
jsonproc: $(SRCS) $(HEADERS)
|
jsonproc: $(SRCS) $(HEADERS)
|
||||||
$(CXX) $(CXXFLAGS) $(INCLUDES) $(SRCS) -o $@ $(LDFLAGS)
|
$(CXX) $(CXXFLAGS) $(INCLUDES) $(SRCS) -o $@ $(LDFLAGS)
|
||||||
|
@ -6,7 +6,10 @@ SRCS := json11.cpp mapjson.cpp
|
|||||||
|
|
||||||
HEADERS := mapjson.h
|
HEADERS := mapjson.h
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: all clean
|
||||||
|
|
||||||
|
all: mapjson
|
||||||
|
@:
|
||||||
|
|
||||||
mapjson: $(SRCS) $(HEADERS)
|
mapjson: $(SRCS) $(HEADERS)
|
||||||
$(CXX) $(CXXFLAGS) $(SRCS) -o $@ $(LDFLAGS)
|
$(CXX) $(CXXFLAGS) $(SRCS) -o $@ $(LDFLAGS)
|
||||||
|
@ -8,7 +8,10 @@ SRCS := asm_file.cpp c_file.cpp charmap.cpp preproc.cpp string_parser.cpp \
|
|||||||
HEADERS := asm_file.h c_file.h char_util.h charmap.h preproc.h string_parser.h \
|
HEADERS := asm_file.h c_file.h char_util.h charmap.h preproc.h string_parser.h \
|
||||||
utf8.h
|
utf8.h
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: all clean
|
||||||
|
|
||||||
|
all: preproc
|
||||||
|
@:
|
||||||
|
|
||||||
preproc: $(SRCS) $(HEADERS)
|
preproc: $(SRCS) $(HEADERS)
|
||||||
$(CXX) $(CXXFLAGS) $(SRCS) -o $@ $(LDFLAGS)
|
$(CXX) $(CXXFLAGS) $(SRCS) -o $@ $(LDFLAGS)
|
||||||
|
@ -6,7 +6,10 @@ SRCS := main.cpp sym_file.cpp elf.cpp
|
|||||||
|
|
||||||
HEADERS := ramscrgen.h sym_file.h elf.h char_util.h
|
HEADERS := ramscrgen.h sym_file.h elf.h char_util.h
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: all clean
|
||||||
|
|
||||||
|
all: ramscrgen
|
||||||
|
@:
|
||||||
|
|
||||||
ramscrgen: $(SRCS) $(HEADERS)
|
ramscrgen: $(SRCS) $(HEADERS)
|
||||||
$(CXX) $(CXXFLAGS) $(SRCS) -o $@ $(LDFLAGS)
|
$(CXX) $(CXXFLAGS) $(SRCS) -o $@ $(LDFLAGS)
|
||||||
|
@ -6,7 +6,10 @@ LIBS = -lpng -lz
|
|||||||
|
|
||||||
SRCS = main.c convert_png.c util.c font.c
|
SRCS = main.c convert_png.c util.c font.c
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: all clean
|
||||||
|
|
||||||
|
all: rsfont
|
||||||
|
@:
|
||||||
|
|
||||||
rsfont: $(SRCS) convert_png.h gfx.h global.h util.h font.h
|
rsfont: $(SRCS) convert_png.h gfx.h global.h util.h font.h
|
||||||
$(CC) $(CFLAGS) $(SRCS) -o $@ $(LDFLAGS) $(LIBS)
|
$(CC) $(CFLAGS) $(SRCS) -o $@ $(LDFLAGS) $(LIBS)
|
||||||
|
@ -6,7 +6,10 @@ SRCS = scaninc.cpp c_file.cpp asm_file.cpp source_file.cpp
|
|||||||
|
|
||||||
HEADERS := scaninc.h asm_file.h c_file.h source_file.h
|
HEADERS := scaninc.h asm_file.h c_file.h source_file.h
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: all clean
|
||||||
|
|
||||||
|
all: scaninc
|
||||||
|
@:
|
||||||
|
|
||||||
scaninc: $(SRCS) $(HEADERS)
|
scaninc: $(SRCS) $(HEADERS)
|
||||||
$(CXX) $(CXXFLAGS) $(SRCS) -o $@ $(LDFLAGS)
|
$(CXX) $(CXXFLAGS) $(SRCS) -o $@ $(LDFLAGS)
|
||||||
|
Loading…
Reference in New Issue
Block a user