TEMPLATE = lib VERSION = 1.2 CONFIG += c++11 shared thread CONFIG -= qt app_bundle #################################################################################### SOURCES += \ src/gfanet.cpp \ src/gfanetmon.cpp \ src/gfawifimon.cpp \ src/interfaces.cpp \ src/inet4s.cpp \ src/inet4d.cpp \ src/inet4m.cpp \ src/util.cpp HEADERS += \ src/gfanet.h \ src/gfanetmon.h \ src/interfaces.h \ src/inet4s.h \ src/inet4d.h \ src/inet4m.h \ src/util.h #################################################################################### GFA_LIB_PATH = /usr/lib/gfa GFA_INC_PATH = /usr/include/gfa QMAKE_RPATHLINKDIR += $$[QT_SYSROOT]$$GFA_LIB_PATH QMAKE_RPATHDIR += $$GFA_LIB_PATH QMAKE_DEL_DIR = rmdir --ignore-fail-on-non-empty QMAKE_LN_SHLIB = : #################################################################################### CONFIG(debug, debug|release) { QMAKE_CXXFLAGS -= -Os QMAKE_CFLAGS -= -Os QMAKE_CXXFLAGS += -D_DEBUG QMAKE_CFLAGS += -D_DEBUG TARGET = $$join(TARGET,,,d) } #################################################################################### target.path = $$GFA_LIB_PATH INSTALLS += target #################################################################################### linux-g++ { QMAKE_CXXFLAGS += -Wno-deprecated-declarations -Wno-misleading-indentation -Wno-unused-result QMAKE_CFLAGS += -Wno-deprecated-declarations -Wno-misleading-indentation -Wno-unused-result includes.path = $$GFA_INC_PATH includes.extra += -$(INSTALL_FILE) $$PWD/src/gfanet.h $(INSTALL_ROOT)$$includes.path includes.extra += $$escape_expand(\\n\\t)-$(INSTALL_FILE) $$PWD/src/interfaces.h $(INSTALL_ROOT)$$includes.path includes.extra += $$escape_expand(\\n\\t)-$(INSTALL_FILE) $$PWD/src/inet4s.h $(INSTALL_ROOT)$$includes.path includes.extra += $$escape_expand(\\n\\t)-$(INSTALL_FILE) $$PWD/src/inet4d.h $(INSTALL_ROOT)$$includes.path includes.extra += $$escape_expand(\\n\\t)-$(INSTALL_FILE) $$PWD/src/inet4m.h $(INSTALL_ROOT)$$includes.path includes.extra += $$escape_expand(\\n\\t)-$(INSTALL_FILE) $$PWD/src/gfanetmon.h $(INSTALL_ROOT)$$includes.path includes.uninstall += -$(DEL_FILE) $(INSTALL_ROOT)$$includes.path/gfanet.h includes.uninstall += $$escape_expand(\\n\\t)-$(DEL_FILE) $(INSTALL_ROOT)$$includes.path/interfaces.h includes.uninstall += $$escape_expand(\\n\\t)-$(DEL_FILE) $(INSTALL_ROOT)$$includes.path/inet4s.h includes.uninstall += $$escape_expand(\\n\\t)-$(DEL_FILE) $(INSTALL_ROOT)$$includes.path/inet4d.h includes.uninstall += $$escape_expand(\\n\\t)-$(DEL_FILE) $(INSTALL_ROOT)$$includes.path/inet4m.h includes.uninstall += $$escape_expand(\\n\\t)-$(DEL_FILE) $(INSTALL_ROOT)$$includes.path/gfanetmon.h INSTALLS += includes } #################################################################################### linux-buildroot-g++ { exists($$[QT_SYSROOT]) { library.path = $$[QT_SYSROOT]$$target.path library.extra += -$(INSTALL_PROGRAM) $(TARGET) $(INSTALL_ROOT)$$library.path/$(TARGET) library.extra += $$escape_expand(\\n\\t)-$(SYMLINK) $(TARGET) $(INSTALL_ROOT)$$library.path/$(TARGET0) library.extra += $$escape_expand(\\n\\t)-$(SYMLINK) $(TARGET) $(INSTALL_ROOT)$$library.path/$(TARGET1) library.extra += $$escape_expand(\\n\\t)-$(SYMLINK) $(TARGET) $(INSTALL_ROOT)$$library.path/$(TARGET2) library.uninstall += -$(DEL_FILE) $(INSTALL_ROOT)$$library.path/$(TARGET) library.uninstall += $$escape_expand(\\n\\t)-$(DEL_FILE) $(INSTALL_ROOT)$$library.path/$(TARGET0) library.uninstall += $$escape_expand(\\n\\t)-$(DEL_FILE) $(INSTALL_ROOT)$$library.path/$(TARGET1) library.uninstall += $$escape_expand(\\n\\t)-$(DEL_FILE) $(INSTALL_ROOT)$$library.path/$(TARGET2) INSTALLS += library includes.path = $$[QT_SYSROOT]$$GFA_INC_PATH includes.extra += -$(INSTALL_FILE) $$PWD/src/gfanet.h $(INSTALL_ROOT)$$includes.path includes.extra += $$escape_expand(\\n\\t)-$(INSTALL_FILE) $$PWD/src/interfaces.h $(INSTALL_ROOT)$$includes.path includes.extra += $$escape_expand(\\n\\t)-$(INSTALL_FILE) $$PWD/src/inet4s.h $(INSTALL_ROOT)$$includes.path includes.extra += $$escape_expand(\\n\\t)-$(INSTALL_FILE) $$PWD/src/inet4d.h $(INSTALL_ROOT)$$includes.path includes.extra += $$escape_expand(\\n\\t)-$(INSTALL_FILE) $$PWD/src/inet4m.h $(INSTALL_ROOT)$$includes.path includes.extra += $$escape_expand(\\n\\t)-$(INSTALL_FILE) $$PWD/src/gfanetmon.h $(INSTALL_ROOT)$$includes.path includes.uninstall += -$(DEL_FILE) $(INSTALL_ROOT)$$includes.path/gfanet.h includes.uninstall += $$escape_expand(\\n\\t)-$(DEL_FILE) $(INSTALL_ROOT)$$includes.path/interfaces.h includes.uninstall += $$escape_expand(\\n\\t)-$(DEL_FILE) $(INSTALL_ROOT)$$includes.path/inet4s.h includes.uninstall += $$escape_expand(\\n\\t)-$(DEL_FILE) $(INSTALL_ROOT)$$includes.path/inet4d.h includes.uninstall += $$escape_expand(\\n\\t)-$(DEL_FILE) $(INSTALL_ROOT)$$includes.path/inet4m.h includes.uninstall += $$escape_expand(\\n\\t)-$(DEL_FILE) $(INSTALL_ROOT)$$includes.path/gfanetmon.h INSTALLS += includes itoolchain.target = install_toolchain itoolchain.depends = install_library install_includes QMAKE_EXTRA_TARGETS += itoolchain utoolchain.target = uninstall_toolchain utoolchain.depends = uninstall_library uninstall_includes QMAKE_EXTRA_TARGETS += utoolchain } QMAKE_CXXFLAGS += -D_TARGET_BUILD QMAKE_CFLAGS += -D_TARGET_BUILD } #################################################################################### deploylib.target = deploylib deploylib.commands = @echo BASENAME="$(QMAKE_TARGET)" > deploytargets deploylib.commands += $$escape_expand(\\n\\t)@echo TARGET="$(TARGET)" >> deploytargets deploylib.commands += $$escape_expand(\\n\\t)@echo TARGET0="$(TARGET0)" >> deploytargets deploylib.commands += $$escape_expand(\\n\\t)@echo TARGET1="$(TARGET1)" >> deploytargets deploylib.commands += $$escape_expand(\\n\\t)@echo TARGET2="$(TARGET2)" >> deploytargets deploylib.commands += $$escape_expand(\\n\\t)@echo HEADERS="\\\"gfanet.h gfanetmon.h interfaces.h inet4s.h inet4d.h inet4m.h\\\"" >> deploytargets PRE_TARGETDEPS += deploylib QMAKE_EXTRA_TARGETS += deploylib