Fixed Makfile
This commit is contained in:
parent
152d83c863
commit
ba7fdaea61
9
Makefile
9
Makefile
@ -7,7 +7,6 @@ MANPAGE := $(BIN).$(MANSECTION)
|
||||
|
||||
SRCS := $(notdir $(wildcard src/*.cpp))
|
||||
OBJS := $(SRCS:.cpp=.o)
|
||||
DEPS := $(SRCS:.cpp=.d)
|
||||
|
||||
BUILDDIR := build/intermediates/
|
||||
PREFIX ?= /usr/local
|
||||
@ -42,17 +41,15 @@ all: prebuild $(OUTDIR)$(BIN)
|
||||
prebuild:
|
||||
@mkdir -p $(BUILDDIR) $(OUTDIR)
|
||||
|
||||
$(OUTDIR)$(BIN): $(OBJS) $(DEPS)
|
||||
$(OUTDIR)$(BIN): $(OBJS)
|
||||
$(CXX) -o $(OUTDIR)$(BIN) $(LDFLAGS) $(LDLIBS) $(addprefix $(BUILDDIR),$(OBJS))
|
||||
@ln -sf $(OUTDIR)$(BIN) $(BIN)
|
||||
|
||||
%.o: %.cpp %.d
|
||||
%.o %.d: %.cpp
|
||||
$(CXX) $(CXXFLAGS) -MMD -MP -MT $@ -MF $*.d -c $<
|
||||
@mv $@ $*.d $(BUILDDIR)
|
||||
|
||||
-include $(BUILDDIR)*.d
|
||||
|
||||
%.d: ;
|
||||
-include $(BUILDDIR)$(SRCS:.cpp=.d)
|
||||
|
||||
test:
|
||||
$(MAKE) -C tests && tests/tests
|
||||
|
Loading…
x
Reference in New Issue
Block a user