include ../common.mk TARGET = owlps-listenerd HEADER = owlps-listener.h ## Compilation-time option ## CFLAGS += -D USE_CONFIG_FILE LDFLAGS += -lconfuse CFLAGS += -D USE_PTHREAD LDFLAGS += -pthread #CFLAGS += -D ENABLE_KEEP_MONITOR #LDFLAGS += -liw ## Additional libraries ## LDFLAGS += -lpcap STATIC_LDFLAGS += $(LIBOWLPS_DIR)/libowlps.a $(LIBOWLPSCLIENT_DIR)/libowlps-client.a SEMISTATIC_LDFLAGS += $(STATIC_LDFLAGS) DYNAMIC_LDFLAGS += -lowlps -lowlps-client ifeq "$(OS)" "Linux" LDFLAGS += -lrt endif ifeq "$(OS)" "GNU/kFreeBSD" LDFLAGS += -lrt endif ## Targets ## dynamic: $(TARGET) semistatic: $(TARGET).semistatic static: $(TARGET).static all: dynamic semistatic static ## Installation / uninstallation ## install : $(TARGET) @$(CP) $(TARGET) $(INSTALL_DIR) @cd $(INSTALL_DIR) ; chown root:root $(TARGET) ; chmod 755 $(TARGET) uninstall : @$(RM) $(INSTALL_DIR)/$(TARGET) ## Help ## help : @echo "Needed libraries:" @echo " libpcap0.8-dev" @echo " libiw-dev (optionnal)" @echo " libconfuse-dev (optionnal)" @echo " libowlps-dev" @echo @echo "Targets:" @echo " $(TARGET) (default target): Builds the program $(TARGET)." @echo " install: Installs the program $(TARGET)." @echo " uninstall: Uninstalls the program $(TARGET)." @echo " clean: Deletes the temporary files." @echo " purge: Deletes the built binaries." @echo @echo "Note: Files are installed under $(PREFIX)." @echo "Tune the PREFIX variable in the Makefile to change that." include ../common-rules.mk