mirror of https://github.com/pret/pokefirered
Fix .d files not updating if .o fails, fix clean rule, remove some unnecessary warnings
This commit is contained in:
parent
93b4a7b815
commit
ab80760dfc
34
Makefile
34
Makefile
|
|
@ -210,8 +210,8 @@ clean-assets:
|
|||
find $(DATA_ASM_SUBDIR)/maps \( -iname 'connections.inc' -o -iname 'events.inc' -o -iname 'header.inc' \) -exec rm {} +
|
||||
|
||||
tidy:
|
||||
rm -f $(ROM) $(ELF) $(MAP)
|
||||
rm -rf $(OBJ_DIR)
|
||||
$(RM) $(ALL_BUILDS:%=poke%{.gba,.elf,.map})
|
||||
$(RM) -r $(BUILD_DIR)
|
||||
|
||||
# "friendly" target names for convenience sake
|
||||
firered: ; @$(MAKE) GAME_VERSION=FIRERED
|
||||
|
|
@ -239,18 +239,18 @@ include audio_rules.mk
|
|||
|
||||
generated: $(AUTO_GEN_TARGETS)
|
||||
|
||||
%.s: ;
|
||||
%.s: ;
|
||||
%.png: ;
|
||||
%.pal: ;
|
||||
%.aif: ;
|
||||
|
||||
%.1bpp: %.png ; $(GFX) $< $@
|
||||
%.4bpp: %.png ; $(GFX) $< $@
|
||||
%.8bpp: %.png ; $(GFX) $< $@
|
||||
%.gbapal: %.pal ; $(GFX) $< $@
|
||||
%.gbapal: %.png ; $(GFX) $< $@
|
||||
%.lz: % ; $(GFX) $< $@
|
||||
%.rl: % ; $(GFX) $< $@
|
||||
%.1bpp: %.png ; $(GFX) $< $@
|
||||
%.4bpp: %.png ; $(GFX) $< $@
|
||||
%.8bpp: %.png ; $(GFX) $< $@
|
||||
%.gbapal: %.pal ; $(GFX) $< $@
|
||||
%.gbapal: %.png ; $(GFX) $< $@
|
||||
%.lz: % ; $(GFX) $< $@
|
||||
%.rl: % ; $(GFX) $< $@
|
||||
|
||||
# NOTE: Tools must have been built prior (FIXME)
|
||||
generated: tools $(AUTO_GEN_TARGETS)
|
||||
|
|
@ -296,7 +296,7 @@ endef
|
|||
# $1: Output file without extension, $2 input file, $3 temp path (if keeping)
|
||||
define C_DEP_IMPL
|
||||
$1.o: $2
|
||||
ifeq (,$(KEEP_TEMPS))
|
||||
ifneq ($(KEEP_TEMPS),1)
|
||||
@echo "$$(CC1) <flags> -o $$@ $$<"
|
||||
@$$(CPP) $$(CPPFLAGS) $$< | $$(PREPROC) -i $$< charmap.txt | $$(CC1) $$(CFLAGS) -o - - | cat - <(echo -e ".text\n\t.align\t2, 0") | $$(AS) $$(ASFLAGS) -o $$@ -
|
||||
else
|
||||
|
|
@ -305,15 +305,11 @@ else
|
|||
@echo -e ".text\n\t.align\t2, 0 @ Don't pad with nop\n" >> $3.s
|
||||
$$(AS) $$(ASFLAGS) -o $$@ $3.s
|
||||
endif
|
||||
$(call C_SCANINC,$1,$2)
|
||||
endef
|
||||
# Calls SCANINC to find dependencies
|
||||
define C_SCANINC
|
||||
$1.d: $2
|
||||
$(SCANINC) -M $1.d $(INCLUDE_SCANINC_ARGS) -I tools/agbcc/include $2
|
||||
ifneq ($(NODEP),1)
|
||||
$1.o: $1.d
|
||||
$1.d: $2
|
||||
$(SCANINC) -M $1.d $(INCLUDE_SCANINC_ARGS) -I tools/agbcc/include -I gflib $2
|
||||
include $1.d
|
||||
-include $1.d
|
||||
endif
|
||||
endef
|
||||
|
||||
|
|
@ -343,7 +339,7 @@ ifneq ($(NODEP),1)
|
|||
$1.o: $1.d
|
||||
$1.d: $2
|
||||
$(SCANINC) -M $1.d $(INCLUDE_SCANINC_ARGS) -I "" $2
|
||||
include $1.d
|
||||
-include $1.d
|
||||
endif
|
||||
endef
|
||||
|
||||
|
|
|
|||
|
|
@ -9,6 +9,8 @@ MODERN ?= 0
|
|||
# Compares the ROM to a checksum of the original - only makes sense using when non-modern
|
||||
COMPARE ?= 0
|
||||
|
||||
KEEP_TEMPS ?= 0
|
||||
|
||||
ifeq (modern,$(MAKECMDGOALS))
|
||||
MODERN := 1
|
||||
endif
|
||||
|
|
|
|||
|
|
@ -33,7 +33,6 @@ using std::vector;
|
|||
using std::map;
|
||||
using std::make_shared;
|
||||
using std::initializer_list;
|
||||
using std::move;
|
||||
|
||||
/* Helper for representing null - just a do-nothing struct, plus comparison
|
||||
* operators so the helpers in JsonValue work. We can't use nullptr_t because
|
||||
|
|
@ -149,7 +148,7 @@ protected:
|
|||
|
||||
// Constructors
|
||||
explicit Value(const T &value) : m_value(value) {}
|
||||
explicit Value(T &&value) : m_value(move(value)) {}
|
||||
explicit Value(T &&value) : m_value(std::move(value)) {}
|
||||
|
||||
// Get type tag
|
||||
Json::Type type() const override {
|
||||
|
|
@ -196,7 +195,7 @@ class JsonString final : public Value<Json::STRING, string> {
|
|||
const string &string_value() const override { return m_value; }
|
||||
public:
|
||||
explicit JsonString(const string &value) : Value(value) {}
|
||||
explicit JsonString(string &&value) : Value(move(value)) {}
|
||||
explicit JsonString(string &&value) : Value(std::move(value)) {}
|
||||
};
|
||||
|
||||
class JsonArray final : public Value<Json::ARRAY, Json::array> {
|
||||
|
|
@ -204,7 +203,7 @@ class JsonArray final : public Value<Json::ARRAY, Json::array> {
|
|||
const Json & operator[](size_t i) const override;
|
||||
public:
|
||||
explicit JsonArray(const Json::array &value) : Value(value) {}
|
||||
explicit JsonArray(Json::array &&value) : Value(move(value)) {}
|
||||
explicit JsonArray(Json::array &&value) : Value(std::move(value)) {}
|
||||
};
|
||||
|
||||
class JsonObject final : public Value<Json::OBJECT, Json::object> {
|
||||
|
|
@ -212,7 +211,7 @@ class JsonObject final : public Value<Json::OBJECT, Json::object> {
|
|||
const Json & operator[](const string &key) const override;
|
||||
public:
|
||||
explicit JsonObject(const Json::object &value) : Value(value) {}
|
||||
explicit JsonObject(Json::object &&value) : Value(move(value)) {}
|
||||
explicit JsonObject(Json::object &&value) : Value(std::move(value)) {}
|
||||
};
|
||||
|
||||
class JsonNull final : public Value<Json::NUL, NullStruct> {
|
||||
|
|
@ -254,12 +253,12 @@ Json::Json(double value) : m_ptr(make_shared<JsonDouble>(value)) {
|
|||
Json::Json(int value) : m_ptr(make_shared<JsonInt>(value)) {}
|
||||
Json::Json(bool value) : m_ptr(value ? statics().t : statics().f) {}
|
||||
Json::Json(const string &value) : m_ptr(make_shared<JsonString>(value)) {}
|
||||
Json::Json(string &&value) : m_ptr(make_shared<JsonString>(move(value))) {}
|
||||
Json::Json(string &&value) : m_ptr(make_shared<JsonString>(std::move(value))) {}
|
||||
Json::Json(const char * value) : m_ptr(make_shared<JsonString>(value)) {}
|
||||
Json::Json(const Json::array &values) : m_ptr(make_shared<JsonArray>(values)) {}
|
||||
Json::Json(Json::array &&values) : m_ptr(make_shared<JsonArray>(move(values))) {}
|
||||
Json::Json(Json::array &&values) : m_ptr(make_shared<JsonArray>(std::move(values))) {}
|
||||
Json::Json(const Json::object &values) : m_ptr(make_shared<JsonObject>(values)) {}
|
||||
Json::Json(Json::object &&values) : m_ptr(make_shared<JsonObject>(move(values))) {}
|
||||
Json::Json(Json::object &&values) : m_ptr(make_shared<JsonObject>(std::move(values))) {}
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * *
|
||||
* Accessors
|
||||
|
|
@ -357,7 +356,7 @@ struct JsonParser final {
|
|||
* Mark this parse as failed.
|
||||
*/
|
||||
Json fail(string &&msg) {
|
||||
return fail(move(msg), Json());
|
||||
return fail(std::move(msg), Json());
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
|
|
|
|||
Loading…
Reference in New Issue