Fix checking of header timestamps.

This is implemented in such a way that a change in one of our headers
won't cause recompilation of large C dependancies. It's a bit hacky, but
it works.
This commit is contained in:
dongresource 2020-08-31 18:10:01 +02:00
parent d7a41d40ab
commit 73c67a814d

View File

@ -89,6 +89,8 @@ CXXOBJ=$(CXXSRC:.cpp=.o)
OBJ=$(COBJ) $(CXXOBJ)
HDR=$(CHDR) $(CXXHDR)
all: $(SERVER)
windows: $(SERVER)
@ -103,12 +105,15 @@ windows : SERVER=$(WIN_SERVER)
.SUFFIX: .o .c .cpp .h .hpp
.c.o: $(CHDR)
.c.o:
$(CC) -c $(CFLAGS) -o $@ $<
.cpp.o: $(CXXHDR)
.cpp.o:
$(CXX) -c $(CXXFLAGS) -o $@ $<
# header timestamps are a prerequisite for OF object files
$(CXXOBJ): $(CXXHDR)
$(SERVER): $(OBJ) $(CHDR) $(CXXHDR)
mkdir -p bin
$(CXX) $(OBJ) $(LDFLAGS) -o $(SERVER)