|
|
@ -37,10 +37,10 @@ OBJ = $(OBJ_C) $(OBJ_CXX)
|
|
|
|
# Phonies
|
|
|
|
# Phonies
|
|
|
|
|
|
|
|
|
|
|
|
.PHONY: release
|
|
|
|
.PHONY: release
|
|
|
|
release: | dirs $(PROJECT)-release
|
|
|
|
release: | dirs $(PROJECT).so $(PROJECT).a
|
|
|
|
|
|
|
|
|
|
|
|
.PHONY: debug
|
|
|
|
.PHONY: debug
|
|
|
|
debug: | dirs $(PROJECT)-debug
|
|
|
|
debug: | dirs $(PROJECT)-debug.so $(PROJECT)-debug.a
|
|
|
|
|
|
|
|
|
|
|
|
# Targets
|
|
|
|
# Targets
|
|
|
|
|
|
|
|
|
|
|
@ -53,22 +53,34 @@ obj/c/%.o: %.c
|
|
|
|
obj/cxx/%.o: %.cpp
|
|
|
|
obj/cxx/%.o: %.cpp
|
|
|
|
$(CXX) -c $< $(CXXFLAGS) -o $@ $(LDFLAGS)
|
|
|
|
$(CXX) -c $< $(CXXFLAGS) -o $@ $(LDFLAGS)
|
|
|
|
|
|
|
|
|
|
|
|
$(PROJECT)-release: CFLAGS+= $(RELEASE_CFLAGS)
|
|
|
|
$(PROJECT).a: CFLAGS+= $(RELEASE_CFLAGS)
|
|
|
|
$(PROJECT)-release: CXXFLAGS += $(RELEASE_CXXFLAGS)
|
|
|
|
$(PROJECT).a: CXXFLAGS += $(RELEASE_CXXFLAGS)
|
|
|
|
$(PROJECT)-release: LDFLAGS += $(RELEASE_LDFLAGS)
|
|
|
|
$(PROJECT).a: $(OBJ)
|
|
|
|
$(PROJECT)-release: $(OBJ)
|
|
|
|
ar -rcs $@ $^
|
|
|
|
$(CXX) $^ $(CXXFLAGS) -o $@ $(LDFLAGS)
|
|
|
|
|
|
|
|
$(STRIP) $@
|
|
|
|
$(STRIP) $@
|
|
|
|
|
|
|
|
|
|
|
|
$(PROJECT)-debug: CFLAGS+= $(DEBUG_CFLAGS)
|
|
|
|
|
|
|
|
$(PROJECT)-debug: CXXFLAGS += $(DEBUG_CXXFLAGS)
|
|
|
|
$(PROJECT).so: CFLAGS+= -fPIC $(RELEASE_CFLAGS)
|
|
|
|
$(PROJECT)-debug: LDFLAGS += $(DEBUG_LDFLAGS)
|
|
|
|
$(PROJECT).so: CXXFLAGS += -fPIC $(RELEASE_CXXFLAGS)
|
|
|
|
$(PROJECT)-debug: $(OBJ)
|
|
|
|
$(PROJECT).so: LDFLAGS += $(RELEASE_LDFLAGS)
|
|
|
|
$(CXX) $^ $(CXXFLAGS) -o $@ $(LDFLAGS)
|
|
|
|
$(PROJECT).so: $(OBJ)
|
|
|
|
|
|
|
|
gcc -shared $^ -o $@
|
|
|
|
|
|
|
|
$(STRIP) $@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$(PROJECT)-debug.a: CFLAGS+= $(DEBUG_CFLAGS)
|
|
|
|
|
|
|
|
$(PROJECT)-debug.a: CXXFLAGS += $(DEBUG_CXXFLAGS)
|
|
|
|
|
|
|
|
$(PROJECT)-debug.a: $(OBJ)
|
|
|
|
|
|
|
|
ar -rcs $@ $^
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$(PROJECT)-debug.so: CFLAGS+= -fPIC $(DEBUG_CFLAGS)
|
|
|
|
|
|
|
|
$(PROJECT)-debug.so: CXXFLAGS += -fPIC $(DEBUG_CXXFLAGS)
|
|
|
|
|
|
|
|
$(PROJECT)-debug.so: LDFLAGS += $(DEBUG_LDFLAGS)
|
|
|
|
|
|
|
|
$(PROJECT)-debug.so: $(OBJ)
|
|
|
|
|
|
|
|
gcc -shared $^ -o $@
|
|
|
|
|
|
|
|
|
|
|
|
clean-rebuild:
|
|
|
|
clean-rebuild:
|
|
|
|
rm -rf obj
|
|
|
|
rm -rf obj
|
|
|
|
|
|
|
|
|
|
|
|
clean: clean-rebuild
|
|
|
|
clean: clean-rebuild
|
|
|
|
rm -f $(PROJECT)-{release,debug,pgo}
|
|
|
|
rm -f $(PROJECT){-debug,}.{so,a}
|
|
|
|
|
|
|
|
|
|
|
|