ROOT_DIR="/usr/local" LIB_DIR=$(DESTDIR)$(ROOT_DIR)"/lib/kisscount/" SHARE_DIR=$(DESTDIR)$(ROOT_DIR)"/share/kisscount/" DOC_DIR=$(DESTDIR)$(ROOT_DIR)"/share/doc/kisscount/" BIN_DIR=$(DESTDIR)$(ROOT_DIR)"/bin/" CXXFLAGS=`pkg-config --cflags QtCore QtGui QtSql` -Wall -Isrc -ggdb CXXFLAGS+=-Wl,--rpath,"$(LIB_DIR)" CXXFLAGS+=-DRESSOURCES_ROOT="\"$(SHARE_DIR)\"" # For developpers #CXXFLAGS+=-DRESSOURCES_ROOT="\"./ressources/\"" LDFLAGS=`pkg-config --libs QtCore QtGui QtSql` LDFLAGS+=-lofx CXX=$(HOST)g++ SOURCES=$(shell find src -name '*.cpp' -type f | tr '\n' ' ') HEADERS=$(shell find src -name '*.h' -type f) OBJS=$(SOURCES:.cpp=.o) all: kc clean: find src -type f -name '*.[o~]' -exec rm -f \{\} \; rm -f kc # %.o : src/model/%.cpp src/model/import/%.cpp src/model/export/%.cpp src/view/%.cpp src/view/grid/%.cpp src/controller/%.cpp src/%.cpp %.o : src/model/%.cpp src/model/import/%.cpp src/model/export/%.cpp src/view/%.cpp src/controller/%.cpp src/%.cpp src/%.c $(CXX) $(CXXFLAGS) -c $< kc: $(OBJS) $(CXX) $(CXXFLAGS) $^ -o $@ $(LDFLAGS) generate_locales: ./tools/generate_locales.sh ifdef WIN32 package: ./tools/package_win32.sh else package: ./tools/package.sh endif install: mkdir -p $(LIB_DIR) $(BIN_DIR) $(SHARE_DIR) $(DOC_DIR) cp kc $(BIN_DIR) find lib -name '*.so*' -exec cp -rf \{\} $(LIB_DIR) \; cp -rf ressources/* $(SHARE_DIR) cp -rf README* ChangeLog CONTRIBUTORS COPYING TODO $(DOC_DIR) remove: rm -rf $(LIB_DIR) $(SHARE_DIR) $(DOC_DIR) $(BIN_DIR)/kc