include ../common.mk TARGET = owlps-udp-to-http ## Additional libraries ## LDFLAGS += -pthread -lowlps -lowlps-resultreader ifeq "$(OS)" "Linux" LDFLAGS += -lrt endif ifeq "$(OS)" "GNU/kFreeBSD" LDFLAGS += -lrt endif ## Targets ## dynamic : $(TARGET) static : $(TARGET).static all : dynamic static ## Installation / uninstallation ## install : $(TARGET) @$(CP) $(TARGET) $(INSTALL_DIR) @cd $(INSTALL_DIR) ; chown root:root $(TARGET) ; chmod 755 $(TARGET) install-static : $(TARGET).static @$(CP) $(TARGET).static $(INSTALL_DIR) @cd $(INSTALL_DIR) ; chown root:root $(TARGET).static ; chmod 755 $(TARGET).static uninstall : @$(RM) $(INSTALL_DIR)/{$(TARGET),$(TARGET).static} ## Help ## help : @echo "Needed libraries:" @echo " libowlps-dev" @echo " libowlps-resultreader-dev" @echo @echo "Targets:" @echo " $(TARGET) (default target): Builds the program $(TARGET)." @echo " $(TARGET).static : Builds the program $(TARGET).static \ (statically linked version)." @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