From e1d6684a7adbf29130411f2a030d01b594a95ca1 Mon Sep 17 00:00:00 2001 From: Robin Krahl Date: Thu, 23 Mar 2017 23:42:57 +0100 Subject: Move sources directly to src and rename to .cpp. --- Makefile | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 3882de1..3cac760 100644 --- a/Makefile +++ b/Makefile @@ -7,16 +7,16 @@ LIBRARY_DIR := lib BINARY_DIR := bin DOCUMENTATION_DIR := doc -SOURCE_NAMES_LIB := sqlitepp.cc -SOURCE_NAMES_TEST := sqlitepp_test.cc +SOURCE_NAMES_LIB := sqlitepp.cpp +SOURCE_NAMES_TEST := sqlitepp_test.cpp TARGETS := $(LIBRARY_DIR)/libsqlitepp.so $(BINARY_DIR)/sqlitepp_test -SOURCES_LIB := $(foreach source,$(SOURCE_NAMES_LIB),$(SOURCE_DIR)/sqlitepp/$(source)) -OBJECTS_LIB := $(SOURCES_LIB:$(SOURCE_DIR)/%.cc=$(OBJECT_DIR)/%.o) +SOURCES_LIB := $(foreach source,$(SOURCE_NAMES_LIB),$(SOURCE_DIR)/$(source)) +OBJECTS_LIB := $(SOURCES_LIB:$(SOURCE_DIR)/%.cpp=$(OBJECT_DIR)/%.o) DEPENDS_LIB := $(OBJECTS_LIB:.o=.d) -SOURCES_TEST := $(foreach source,$(SOURCE_NAMES_TEST),$(SOURCE_DIR)/sqlitepp/$(source)) -OBJECTS_TEST := $(SOURCES_TEST:$(SOURCE_DIR)/%.cc=$(OBJECT_DIR)/%.o) +SOURCES_TEST := $(foreach source,$(SOURCE_NAMES_TEST),$(SOURCE_DIR)/$(source)) +OBJECTS_TEST := $(SOURCES_TEST:$(SOURCE_DIR)/%.cpp=$(OBJECT_DIR)/%.o) DEPENDS_TEST := $(OBJECTS_TEST:.o=.d) INCLUDES := $(INCLUDE_DIR)/sqlitepp/sqlitepp.h @@ -61,10 +61,9 @@ $(BINARY_DIR)/sqlitepp_test: $(OBJECTS_TEST) $(QUIET)mkdir -p $(BINARY_DIR) $(QUIET)$(CXX) $(LDFLAGS) $(LDFLAGS_TEST) $< -o $@ -$(OBJECTS): $(OBJECT_DIR)/%.o: $(SOURCE_DIR)/%.cc +$(OBJECTS): $(OBJECT_DIR)/%.o: $(SOURCE_DIR)/%.cpp $(info (CXX) $@) $(QUIET)mkdir -p $(OBJECT_DIR) - $(QUIET)mkdir -p $(OBJECT_DIR)/sqlitepp $(QUIET)$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $< -o $@ -include $(DEPENDS) -- cgit v1.2.3