2009-08-17 22:37:20 +05:30
|
|
|
include ../vars.mk
|
|
|
|
|
2009-10-27 06:16:00 +05:30
|
|
|
LIBMAJOR = 0
|
|
|
|
LIBMINOR = 0
|
|
|
|
LIBMICRO = 0
|
|
|
|
LIBXBPS_SHLIB = libxbps.so.$(LIBMAJOR).$(LIBMINOR).$(LIBMICRO)
|
2009-11-18 14:35:45 +05:30
|
|
|
SHAREDLIB_LDFLAGS = -lprop -larchive
|
|
|
|
ifdef WITH_SSL
|
|
|
|
SHAREDLIB_LDFLAGS += -lssl
|
|
|
|
endif
|
|
|
|
SHAREDLIB_LDFLAGS += -shared -Wl,-soname,libxbps.so.$(LIBMAJOR)
|
2009-10-27 06:16:00 +05:30
|
|
|
|
|
|
|
# libfetch
|
2009-11-18 14:35:45 +05:30
|
|
|
LIBFETCH_OBJS = fetch/common.o fetch/fetch.o fetch/file.o fetch/ftp.o fetch/http.o
|
2009-10-27 06:16:00 +05:30
|
|
|
|
|
|
|
# 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
|
2009-10-27 09:10:00 +05:30
|
|
|
OBJS += repository.o requiredby.o sha256.o sortdeps.o state.o
|
2009-11-28 07:08:41 +05:30
|
|
|
OBJS += sync_remote_pkgidx.o unpack.o util.o pkgmatch.o mkpath.o
|
2009-11-26 07:52:50 +05:30
|
|
|
OBJS += regpkgs_dictionary.o repository_plist.o repository_pool.o
|
2009-11-28 10:13:21 +05:30
|
|
|
OBJS += remove_obsoletes.o config_files.o
|
2009-10-27 06:16:00 +05:30
|
|
|
|
2009-11-18 14:35:45 +05:30
|
|
|
.PHONY: all
|
2009-10-27 06:16:00 +05:30
|
|
|
all: libfetch libxbps.so libxbps.a
|
2009-08-17 22:37:20 +05:30
|
|
|
|
2009-10-27 06:16:00 +05:30
|
|
|
libfetch:
|
2009-11-19 10:33:37 +05:30
|
|
|
@$(MAKE) -C fetch
|
2009-10-27 06:16:00 +05:30
|
|
|
|
2009-10-30 16:47:26 +05:30
|
|
|
%.o: %.c
|
2009-11-19 10:33:37 +05:30
|
|
|
@echo " [CC] $@"
|
|
|
|
@$(CC) $(CPPFLAGS) $(SHAREDLIB_CFLAGS) $(CFLAGS) \
|
2009-11-18 14:35:45 +05:30
|
|
|
$(LDFLAGS) $(STATIC_LIBS) -c $<
|
2009-10-30 16:47:26 +05:30
|
|
|
|
2009-11-18 14:35:45 +05:30
|
|
|
libxbps.so: $(OBJS) $(LIBFETCH_OBJS)
|
2009-11-19 10:33:37 +05:30
|
|
|
@echo " [CCLD] $@"
|
|
|
|
@$(CC) $(LDFLAGS) $(SHAREDLIB_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-11-18 14:35:45 +05:30
|
|
|
libxbps.a: $(OBJS) $(LIBFETCH_OBJS)
|
2009-11-19 10:33:37 +05:30
|
|
|
@echo " [AR] $@"
|
|
|
|
@$(AR) rcs $@ $^
|
|
|
|
@echo " [RANLIB] $@"
|
|
|
|
@ranlib $@
|
2009-08-17 22:37:20 +05:30
|
|
|
|
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)
|
2009-11-19 10:33:37 +05:30
|
|
|
@$(MAKE) -C fetch clean
|