owlps/owlps-client/Makefile

69 lines
1.6 KiB
Makefile

include ../common.mk
TARGET = owlps-client
## Compilation-time option ##
#CFLAGS += -D ENABLE_RECEIVE_POSITION
#LDFLAGS += -lowlps-resultreader
## Additional libraries ##
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)
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-client-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