|
|
@ -19,19 +19,20 @@ endif |
|
|
|
|
|
|
|
|
|
|
|
all: obj $(SHLIB) $(I2PD) |
|
|
|
all: obj $(SHLIB) $(I2PD) |
|
|
|
|
|
|
|
|
|
|
|
.SUFFIXES: |
|
|
|
obj: |
|
|
|
.SUFFIXES: .c .cc .C .cpp .o |
|
|
|
mkdir -p obj |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# weaker rule for building files without headers
|
|
|
|
obj/%.o : %.cpp |
|
|
|
obj/%.o : %.cpp |
|
|
|
$(CXX) $(CXXFLAGS) $(NEEDED_CXXFLAGS) $(INCFLAGS) $(CPU_FLAGS) -c -o $@ $< |
|
|
|
$(CXX) $(CXXFLAGS) $(NEEDED_CXXFLAGS) $(INCFLAGS) $(CPU_FLAGS) -c -o $@ $< |
|
|
|
|
|
|
|
|
|
|
|
obj: |
|
|
|
obj/%.o : %.cpp %.h |
|
|
|
mkdir -p obj |
|
|
|
$(CXX) $(CXXFLAGS) $(NEEDED_CXXFLAGS) $(INCFLAGS) $(CPU_FLAGS) -c -o $@ $< |
|
|
|
|
|
|
|
|
|
|
|
$(I2PD): $(OBJECTS:obj/%=obj/%) |
|
|
|
$(I2PD): $(patsubst %.cpp,obj/%.o,$(DAEMON_SRC)) |
|
|
|
$(CXX) -o $@ $^ $(LDLIBS) $(LDFLAGS) $(LIBS) |
|
|
|
$(CXX) -o $@ $^ $(LDLIBS) $(LDFLAGS) $(LIBS) |
|
|
|
|
|
|
|
|
|
|
|
$(SHLIB): $(OBJECTS:obj/%=obj/%) api.cpp |
|
|
|
$(SHLIB): $(patsubst %.cpp,obj/%.o,$(LIB_SRC)) |
|
|
|
$(CXX) $(CXXFLAGS) $(NEEDED_CXXFLAGS) $(INCFLAGS) $(CPU_FLAGS) -shared -o $@ $^ |
|
|
|
$(CXX) $(CXXFLAGS) $(NEEDED_CXXFLAGS) $(INCFLAGS) $(CPU_FLAGS) -shared -o $@ $^ |
|
|
|
|
|
|
|
|
|
|
|
clean: |
|
|
|
clean: |
|
|
|