mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-14 21:56:41 +01:00
fbedb74404
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
33 lines
764 B
Text
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
|