2010-05-20 02:08:27 +05:30
|
|
|
-include ../config.mk
|
2009-08-17 22:37:20 +05:30
|
|
|
|
2019-06-27 20:39:43 +05:30
|
|
|
RANLIB ?= ranlib
|
|
|
|
|
2020-02-09 00:01:29 +05:30
|
|
|
LIBXBPS_MAJOR = 5
|
|
|
|
LIBXBPS_MINOR = 0
|
2020-04-14 23:41:39 +05:30
|
|
|
LIBXBPS_MICRO = 1
|
2010-01-19 01:48:26 +05:30
|
|
|
LIBXBPS_SHLIB = libxbps.so.$(LIBXBPS_MAJOR).$(LIBXBPS_MINOR).$(LIBXBPS_MICRO)
|
2011-02-24 20:03:53 +05:30
|
|
|
LDFLAGS += $(LIBXBPS_LDFLAGS) -shared -Wl,-soname,libxbps.so.$(LIBXBPS_MAJOR)
|
2009-10-27 06:16:00 +05:30
|
|
|
|
2010-04-20 17:52:38 +05:30
|
|
|
# portableproplib
|
2021-02-05 03:12:57 +05:30
|
|
|
LIBPROP_OBJS += portableproplib/prop_array.o portableproplib/prop_bool.o
|
|
|
|
LIBPROP_OBJS += portableproplib/prop_dictionary.o portableproplib/prop_ingest.o
|
|
|
|
LIBPROP_OBJS += portableproplib/prop_object.o
|
|
|
|
LIBPROP_OBJS += portableproplib/prop_stack.o portableproplib/prop_string.o
|
|
|
|
LIBPROP_OBJS += portableproplib/prop_array_util.o portableproplib/prop_number.o
|
|
|
|
LIBPROP_OBJS += portableproplib/prop_dictionary_util.o portableproplib/prop_zlib.o
|
|
|
|
LIBPROP_OBJS += portableproplib/prop_data.o
|
2020-12-06 02:52:03 +05:30
|
|
|
LIBPROP_CFLAGS = -Wno-unused-parameter
|
|
|
|
ifdef HAVE_VISIBILITY
|
|
|
|
LIBPROP_CFLAGS += -fvisibility=hidden
|
|
|
|
endif
|
2010-04-20 17:52:38 +05:30
|
|
|
|
2009-10-27 06:16:00 +05:30
|
|
|
# libfetch
|
2021-02-05 03:12:57 +05:30
|
|
|
LIBFETCH_OBJS = fetch/common.o fetch/fetch.o fetch/file.o
|
|
|
|
LIBFETCH_OBJS += fetch/ftp.o fetch/http.o
|
2014-12-28 08:04:36 +05:30
|
|
|
LIBFETCH_CPPFLAGS = -DFTP_COMBINE_CWDS -DINET6 -DWITH_SSL
|
2011-01-15 18:07:16 +05:30
|
|
|
ifdef HAVE_VISIBILITY
|
2015-02-15 10:17:35 +05:30
|
|
|
LIBFETCH_CFLAGS= -fvisibility=hidden
|
2011-01-15 18:07:16 +05:30
|
|
|
endif
|
2021-02-05 03:12:57 +05:30
|
|
|
LIBFETCH_INCS = fetch/common.h
|
|
|
|
LIBFETCH_GEN = fetch/ftperr.h fetch/httperr.h
|
2009-10-27 06:16:00 +05:30
|
|
|
|
2011-10-24 12:35:16 +05:30
|
|
|
# External code used by libxbps
|
2012-12-06 17:28:17 +05:30
|
|
|
EXTOBJS = external/dewey.o external/fexec.o external/mkpath.o
|
2011-10-24 12:35:16 +05:30
|
|
|
|
2009-10-27 06:16:00 +05:30
|
|
|
# libxbps
|
2010-11-04 00:38:33 +05:30
|
|
|
OBJS = package_configure.o package_config_files.o package_orphans.o
|
2020-02-21 13:38:22 +05:30
|
|
|
OBJS += package_remove.o package_state.o package_msg.o
|
2013-12-24 15:13:55 +05:30
|
|
|
OBJS += package_unpack.o package_register.o package_script.o verifysig.o
|
2020-02-21 13:38:22 +05:30
|
|
|
OBJS += transaction_commit.o transaction_prepare.o
|
|
|
|
OBJS += transaction_ops.o transaction_store.o transaction_check_replaces.o
|
|
|
|
OBJS += transaction_check_revdeps.o transaction_check_conflicts.o
|
|
|
|
OBJS += transaction_check_shlibs.o
|
|
|
|
OBJS += transaction_files.o transaction_fetch.o transaction_pkg_deps.o
|
2021-06-24 20:38:53 +05:30
|
|
|
OBJS += transaction_internalize.o
|
2015-10-28 09:53:42 +05:30
|
|
|
OBJS += pubkey2fp.o package_fulldeptree.o
|
|
|
|
OBJS += download.o initend.o pkgdb.o
|
2013-06-10 13:58:39 +05:30
|
|
|
OBJS += plist.o plist_find.o plist_match.o archive.o
|
2020-02-14 17:51:12 +05:30
|
|
|
OBJS += plist_remove.o plist_fetch.o util.o util_path.o util_hash.o
|
2020-02-21 13:38:22 +05:30
|
|
|
OBJS += repo.o repo_sync.o
|
2013-12-25 13:18:24 +05:30
|
|
|
OBJS += rpool.o cb_util.o proplib_wrapper.o
|
2015-10-18 14:08:35 +05:30
|
|
|
OBJS += package_alternatives.o
|
2019-03-06 19:04:23 +05:30
|
|
|
OBJS += conf.o log.o
|
2019-04-22 19:00:02 +05:30
|
|
|
OBJS += $(EXTOBJS) $(COMPAT_OBJS)
|
2019-06-18 19:04:30 +05:30
|
|
|
# unnecessary unless pkgdb format changes
|
|
|
|
# OBJS += pkgdb_conversion.o
|
2009-11-18 14:35:45 +05:30
|
|
|
.PHONY: all
|
2010-01-19 01:48:26 +05:30
|
|
|
all: libxbps.so libxbps.a
|
2009-08-17 22:37:20 +05:30
|
|
|
|
2021-02-05 03:12:57 +05:30
|
|
|
fetch/ftperr.h: fetch/ftp.errors
|
2010-01-24 18:29:58 +05:30
|
|
|
@printf " [GEN]\t\t$@\n"
|
2021-02-05 03:12:57 +05:30
|
|
|
${SILENT}./fetch/errlist.sh ftp_errlist FTP $< > $@
|
2009-10-27 06:16:00 +05:30
|
|
|
|
2021-02-05 03:12:57 +05:30
|
|
|
fetch/httperr.h: fetch/http.errors
|
2010-01-24 18:29:58 +05:30
|
|
|
@printf " [GEN]\t\t$@\n"
|
2021-02-05 03:12:57 +05:30
|
|
|
@./fetch/errlist.sh http_errlist HTTP $< > $@
|
2010-01-19 01:48:26 +05:30
|
|
|
|
|
|
|
$(LIBFETCH_OBJS): %.o: %.c $(LIBFETCH_INCS) $(LIBFETCH_GEN)
|
2010-01-24 18:29:58 +05:30
|
|
|
@printf " [CC]\t\t$@\n"
|
2011-01-15 15:19:35 +05:30
|
|
|
${SILENT}$(CC) $(CPPFLAGS) $(LIBFETCH_CPPFLAGS) $(CFLAGS) \
|
2013-06-19 15:27:25 +05:30
|
|
|
$(LIBFETCH_CFLAGS) -c $< -o $@
|
2010-01-19 01:48:26 +05:30
|
|
|
|
2010-04-20 17:52:38 +05:30
|
|
|
$(LIBPROP_OBJS): %.o: %.c
|
|
|
|
@printf " [CC]\t\t$@\n"
|
2011-01-25 17:30:23 +05:30
|
|
|
${SILENT}$(CC) $(CPPFLAGS) $(LIBPROP_CPPFLAGS) \
|
|
|
|
$(CFLAGS) $(LIBPROP_CFLAGS) -c $< -o $@
|
2010-04-20 17:52:38 +05:30
|
|
|
|
2010-01-19 01:48:26 +05:30
|
|
|
$(OBJS): %.o: %.c
|
2010-01-24 18:29:58 +05:30
|
|
|
@printf " [CC]\t\t$@\n"
|
2011-01-15 15:19:35 +05:30
|
|
|
${SILENT}$(CC) $(CPPFLAGS) $(CFLAGS) $(SHAREDLIB_CFLAGS) -c $< -o $@
|
2009-10-30 16:47:26 +05:30
|
|
|
|
2013-06-20 13:56:12 +05:30
|
|
|
libxbps.so: $(LIBFETCH_OBJS) $(LIBPROP_OBJS) $(OBJS)
|
2010-01-24 18:29:58 +05:30
|
|
|
@printf " [CCLD]\t\t$@\n"
|
2020-09-06 03:50:08 +05:30
|
|
|
${SILENT}$(CC) $^ $(CFLAGS) $(LDFLAGS) -o $(LIBXBPS_SHLIB)
|
2010-01-19 01:48:26 +05:30
|
|
|
@-ln -sf $(LIBXBPS_SHLIB) libxbps.so.$(LIBXBPS_MAJOR)
|
2009-11-19 10:33:37 +05:30
|
|
|
@-ln -sf $(LIBXBPS_SHLIB) libxbps.so
|
2009-08-17 22:37:20 +05:30
|
|
|
|
2013-06-20 13:56:12 +05:30
|
|
|
libxbps.a: $(LIBFETCH_OBJS) $(LIBPROP_OBJS) $(OBJS)
|
2010-01-24 18:29:58 +05:30
|
|
|
@printf " [AR]\t\t$@\n"
|
2011-01-15 15:19:35 +05:30
|
|
|
${SILENT}$(AR) rcs $@ $^
|
2010-01-24 18:29:58 +05:30
|
|
|
@printf " [RANLIB]\t$@\n"
|
2019-06-27 20:39:43 +05:30
|
|
|
${SILENT}$(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
|
2023-07-27 03:12:28 +05:30
|
|
|
-install -d $(DESTDIR)$(LIBDIR)
|
2010-01-24 18:29:58 +05:30
|
|
|
install -m 644 libxbps.a $(DESTDIR)$(LIBDIR)
|
|
|
|
install -m 755 $(LIBXBPS_SHLIB) $(DESTDIR)$(LIBDIR)
|
|
|
|
cp -a libxbps.so $(DESTDIR)$(LIBDIR)
|
|
|
|
cp -a libxbps.so.$(LIBXBPS_MAJOR) $(DESTDIR)$(LIBDIR)
|
2009-08-17 22:37:20 +05:30
|
|
|
|
2009-10-18 14:45:39 +05:30
|
|
|
.PHONY: uninstall
|
|
|
|
uninstall:
|
2010-01-24 18:29:58 +05:30
|
|
|
-rm -f $(DESTDIR)$(LIBDIR)/libxbps.*
|
2009-10-18 14:45:39 +05:30
|
|
|
|
2009-08-17 22:37:20 +05:30
|
|
|
.PHONY: clean
|
2009-10-27 06:16:00 +05:30
|
|
|
clean:
|
2010-04-20 17:52:38 +05:30
|
|
|
-rm -f libxbps* $(OBJS) $(LIBFETCH_OBJS) $(LIBPROP_OBJS)
|
2010-01-19 01:48:26 +05:30
|
|
|
-rm -f $(LIBFETCH_GEN)
|