include ../common.mk TARGET_LIB = libowlps STATIC = $(TARGET_LIB).a DYNAMIC = $(TARGET_LIB).so.$(LIBOWLPS_VERSION) HEADER = owlps.h ## Additional libraries ## LDFLAGS += -lc ## Targets ## all : dynamic static dynamic : $(DYNAMIC) static : $(STATIC) ## Installation ## install : install-static install-dynamic install-dynamic : install-header $(DYNAMIC) @$(CP) $(DYNAMIC) $(INSTALL_LIB) &&\ chmod 644 $(INSTALL_LIB)/$(DYNAMIC) &&\ chown root:root $(INSTALL_LIB)/$(DYNAMIC) &&\ cd $(INSTALL_LIB) && $(SYMLINK) $(DYNAMIC) $(TARGET_LIB).so &&\ echo "Reconstruction du cache pour ld.so : ldconfig $(INSTALL_LIB)" ; ldconfig $(INSTALL_LIB) install-static : install-header $(STATIC) @$(CP) $(STATIC) $(INSTALL_LIB) &&\ chmod 644 $(INSTALL_LIB)/$(STATIC) &&\ chown root:root $(INSTALL_LIB)/$(STATIC) install-header : $(HEADER) @$(CP) $(HEADER) $(INSTALL_INC) &&\ chmod 644 $(INSTALL_INC)/$(HEADER) &&\ chown root:root $(INSTALL_INC)/$(HEADER) ## Uninstallation ## uninstall : uninstall-dynamic uninstall-static uninstall-dynamic : uninstall-header @$(RM) $(INSTALL_LIB)/$(DYNAMIC) $(INSTALL_LIB)/$(TARGET_LIB).so @echo "Reconstruction du cache pour ld.so : ldconfig" ; ldconfig uninstall-static : uninstall-header @$(RM) $(INSTALL_LIB)/$(STATIC) uninstall-header : @$(RM) $(INSTALL_INC)/$(HEADER) ## Help ## help : @echo "Needed libraries:" @echo " libiw-dev" @echo @echo "Targets:" @echo " all (default target): Builds the library (dynamic & static)." @echo " dynamic: Builds the shared library." @echo " static: Builds the static library." @echo @echo " install: Installs the library (dynamic & static)." @echo " install-dynamic: Installs the shared library." @echo " install-static: Installs the static library." @echo @echo " uninstall: Uninstalls everything." @echo " uninstall-dynamic: Uninstalls the shared library." @echo " uninstall-static: Uninstalls the static library." @echo @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