diff --git a/.gitignore b/.gitignore index 5761abc..6142305 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ *.o +*.d diff --git a/Makefile b/Makefile index c62e063..0a716e3 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -CXXFLAGS = -Isrc -Isrc/sys -D_SYSTEM3 -D_DEBUG_CONSOLE +CXXFLAGS = -Isrc -Isrc/sys -D_SYSTEM3 -D_DEBUG_CONSOLE -MMD LIBS = -lgdi32 -lgdiplus -lwinmm @@ -21,6 +21,8 @@ OBJS = src/fileio.o \ src/sys/nact_sys3.o \ src/res3/Script1.o +DEPS := $(OBJS:%.o=%.d) + system3.exe: $(OBJS) $(CXX) $(OBJS) $(LIBS) -mwindows -static -o $@ @@ -28,4 +30,6 @@ src/res3/Script1.o: src/res3/Script1.rc windres $< $@ clean: - rm -f src/*.o src/sys/*.o src/res3/*.o system3.exe + rm -f src/*.o src/sys/*.o src/res3/*.o system3.exe $(DEPS) + +-include $(DEPS)