2009-08-17 22:37:20 +05:30
|
|
|
include ../vars.mk
|
|
|
|
|
2009-10-27 06:16:00 +05:30
|
|
|
INET6 ?= yes
|
|
|
|
SSL ?= yes
|
|
|
|
LIBS = -larchive -lprop
|
|
|
|
|
|
|
|
ifdef SSL
|
|
|
|
CPPFLAGS += -DWITH_SSL
|
|
|
|
LIBS += -lssl -lcrypto
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef INET6
|
|
|
|
CPPFLAGS += -DINET6
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef DEBUG
|
|
|
|
CPPFLAGS += -DDEBUG
|
|
|
|
endif
|
|
|
|
|
|
|
|
LIBMAJOR = 0
|
|
|
|
LIBMINOR = 0
|
|
|
|
LIBMICRO = 0
|
|
|
|
LIBXBPS_SHLIB = libxbps.so.$(LIBMAJOR).$(LIBMINOR).$(LIBMICRO)
|
|
|
|
LIBXBPS_LDFLAGS = $(LIBS) -shared -Wl,-soname,libxbps.so.$(LIBMAJOR)
|
|
|
|
|
|
|
|
# libfetch
|
|
|
|
OBJS = fetch/common.o fetch/fetch.o fetch/file.o fetch/ftp.o fetch/http.o
|
|
|
|
|
|
|
|
# libxbps
|
|
|
|
OBJS += configure.o cmpver.o depends.o download.o fexec.o findpkg.o
|
|
|
|
OBJS += humanize_number.o orphans.o plist.o purge.o register.o remove.o
|
|
|
|
OBJS += repository.o requiredby.o sha256.o sortdeps.o state.o unpack.o
|
|
|
|
OBJS += util.o
|
|
|
|
|
|
|
|
all: libfetch libxbps.so libxbps.a
|
2009-08-17 22:37:20 +05:30
|
|
|
.PHONY: all
|
|
|
|
|
2009-10-27 06:16:00 +05:30
|
|
|
libfetch:
|
|
|
|
$(MAKE) -C fetch
|
|
|
|
|
|
|
|
libxbps.so: $(OBJS)
|
|
|
|
$(CC) $(LIBXBPS_LDFLAGS) $^ -o $(LIBXBPS_SHLIB)
|
|
|
|
-ln -sf $(LIBXBPS_SHLIB) libxbps.so.$(LIBMAJOR)
|
|
|
|
-ln -sf $(LIBXBPS_SHLIB) libxbps.so
|
2009-08-17 22:37:20 +05:30
|
|
|
|
2009-10-27 06:16:00 +05:30
|
|
|
libxbps.a: $(OBJS)
|
2009-08-17 22:37:20 +05:30
|
|
|
$(AR) rcs $@ $^
|
|
|
|
ranlib $@
|
|
|
|
|
2009-08-21 14:47:58 +05:30
|
|
|
.PHONY: install
|
2009-10-27 06:16:00 +05:30
|
|
|
install: all
|
2009-08-17 22:37:20 +05:30
|
|
|
install -d $(LIBDIR)
|
2009-10-27 06:16:00 +05:30
|
|
|
install -m 644 libxbps.a $(LIBDIR)
|
|
|
|
install -m 644 $(LIBXBPS_SHLIB) $(LIBDIR)
|
|
|
|
cp -a libxbps.so $(LIBDIR)
|
|
|
|
cp -a libxbps.so.$(LIBMAJOR) $(LIBDIR)
|
2009-08-17 22:37:20 +05:30
|
|
|
|
2009-10-18 14:45:39 +05:30
|
|
|
.PHONY: uninstall
|
|
|
|
uninstall:
|
|
|
|
-rm -f $(LIBDIR)/libxbps.*
|
|
|
|
|
2009-08-17 22:37:20 +05:30
|
|
|
.PHONY: clean
|
2009-10-27 06:16:00 +05:30
|
|
|
clean:
|
|
|
|
-rm -f libxbps* $(OBJS)
|
|
|
|
$(MAKE) -C fetch clean
|