2008-12-21 22:57:02 +00:00
|
|
|
include ../vars.mk
|
|
|
|
|
|
|
|
# The shared library.
|
|
|
|
MAJOR = 0
|
|
|
|
MINOR = 0
|
|
|
|
MICRO = 0
|
|
|
|
LIBXBPS_SO = $(LIBXBPS).$(MAJOR).$(MINOR).$(MICRO)
|
|
|
|
LIBXBPS = libxbps.so
|
2008-12-23 11:28:21 +00:00
|
|
|
LIBXBPS_LDFLAGS = -larchive -lprop -shared -Wl,-soname,$(LIBXBPS).$(MAJOR)
|
|
|
|
|
2008-12-24 06:20:19 +00:00
|
|
|
OBJECTS = cmpver.o depends.o humanize_number.o install.o plist.o
|
2009-02-05 13:46:09 +00:00
|
|
|
OBJECTS += sha256.o util.o repository.o fexec.o remove.o
|
2008-12-21 22:57:02 +00:00
|
|
|
|
|
|
|
all: $(LIBXBPS)
|
|
|
|
.PHONY: all
|
|
|
|
|
2008-12-23 11:28:21 +00:00
|
|
|
$(LIBXBPS): $(OBJECTS)
|
2008-12-21 22:57:02 +00:00
|
|
|
$(CC) $(LIBXBPS_LDFLAGS) $^ -o $(LIBXBPS_SO)
|
|
|
|
-ln -sf $(LIBXBPS_SO) $(LIBXBPS).$(MAJOR)
|
|
|
|
-ln -sf $(LIBXBPS_SO) $(LIBXBPS)
|
|
|
|
|
2008-12-22 01:14:40 +00:00
|
|
|
install: $(LIBXBPS)
|
|
|
|
install -d $(LIBDIR)
|
|
|
|
install -m 644 $(LIBXBPS_SO) $(LIBDIR)
|
|
|
|
|
2008-12-21 22:57:02 +00:00
|
|
|
.PHONY: clean
|
|
|
|
clean: clean-lib clean-objs
|
|
|
|
|
|
|
|
clean-lib:
|
|
|
|
-rm -f $(LIBXBPS)*
|
|
|
|
|
|
|
|
clean-objs:
|
|
|
|
-rm -f *.o
|