slackbuilds_ponce/libraries/crossguid/Makefile.crossguid
Larry Hajali fbedb74404 libraries/crossguid: Added (cross platform C++ GUID/UUID library).
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
2016-08-15 18:48:48 +01:00

33 lines
764 B
Text

override CXXFLAGS += -std=c++11 -DGUID_LIBUUID -fPIC
override LDFLAGS += -luuid
MAJOR := 0
MINOR := 0
VERSION := $(MAJOR).$(MINOR)
NAME = crossguid
INCLUDEDIR = /usr/include
LIBDIR = /usr/lib
LINK.o = $(LINK.cc)
SRC = $(wildcard *.cpp)
OBJ = $(SRC:.cpp=.o)
LIB = lib$(NAME).so.$(VERSION)
$(LIB): guid.o
$(CXX) $(LDFLAGS) -shared -Wl,-soname,lib$(NAME).so.$(MAJOR) $^ -o $@
test: $(OBJ)
install: guid.h $(LIB)
install -dm 0755 $(DESTDIR)$(INCLUDEDIR)
install -pm 0644 guid.h $(DESTDIR)$(INCLUDEDIR)
install -dm 0755 $(DESTDIR)$(LIBDIR)
install -pm 0755 $(LIB) $(DESTDIR)$(LIBDIR)
ln -sf $(LIB) $(DESTDIR)$(LIBDIR)/lib$(NAME).so
ln -sf $(LIB) $(DESTDIR)$(LIBDIR)/lib$(NAME).so.$(MAJOR)
clean:
$(RM) $(OBJ) $(LIB) test
.PHONY: run-test install clean