summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorXaviDCR92 <xavi.dcr@gmail.com>2017-09-09 12:47:17 +0200
committerXaviDCR92 <xavi.dcr@gmail.com>2017-09-09 12:47:17 +0200
commita7dd9781961b5f26d5dca6829e1933dff6209d23 (patch)
tree6e3f1c469e6997fedbaa096f377d67f99a65ae47 /Makefile
parent786dccd2bc0946d48b8a2758ef2c607678bc8dd9 (diff)
downloadpocketempires-a7dd9781961b5f26d5dca6829e1933dff6209d23.tar.gz
Simple collision detection between units added. libgamebuino was always updating header files, so targets were always being rebuilt.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile16
1 files changed, 7 insertions, 9 deletions
diff --git a/Makefile b/Makefile
index abd17f8..d98733d 100644
--- a/Makefile
+++ b/Makefile
@@ -33,7 +33,13 @@ libs:
run: $(EXE_DIR)/$(PROJECT).ELF
$(GBSIM) $^
-depend: $(DEPS)
+-include $(DEPS)
+
+$(OBJ_DIR)/%.o: $(SRC_DIR)/%.cpp $(OBJ_DIR)/%.d
+ $(CXX) $< -o $@ $(INCLUDE) $(DEFINE) $(CC_FLAGS) -MMD
+
+$(OBJ_DIR)/%.o: $(SRC_DIR)/%.c $(OBJ_DIR)/%.d
+ $(CC) $< -o $@ $(INCLUDE) $(DEFINE) $(CC_FLAGS) -MMD
$(OBJ_DIR)/%.d: $(SRC_DIR)/%.c
$(CC) $< $(DEFINE) $(INCLUDE) -M -MF $@
@@ -41,14 +47,6 @@ $(OBJ_DIR)/%.d: $(SRC_DIR)/%.c
$(OBJ_DIR)/%.d: $(SRC_DIR)/%.cpp
$(CXX) $< $(DEFINE) $(INCLUDE) -M -MF $@
-$(OBJ_DIR)/%.o: $(SRC_DIR)/%.cpp $(OBJ_DIR)/%.d
- $(CXX) $< -o $@ $(INCLUDE) $(DEFINE) $(CC_FLAGS)
-
-$(OBJ_DIR)/%.o: $(SRC_DIR)/%.c $(OBJ_DIR)/%.d
- $(CC) $< -o $@ $(INCLUDE) $(DEFINE) $(CC_FLAGS)
-
--include $(DEPS)
-
clean:
rm *.elf -f
rm $(OBJ_DIR)/*.o $(OBJ_DIR)/*.d -f