2010-05-20 02:08:27 +05:30
|
|
|
-include ../config.mk
|
2009-08-17 22:37:20 +05:30
|
|
|
|
2010-01-19 01:48:26 +05:30
|
|
|
LIBXBPS_MAJOR = 0
|
|
|
|
LIBXBPS_MINOR = 0
|
|
|
|
LIBXBPS_MICRO = 0
|
|
|
|
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
|
|
|
|
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 portableproplib/prop_rb.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
|
|
|
|
LIBPROP_OBJS += portableproplib/prop_data.o
|
2011-01-25 17:30:23 +05:30
|
|
|
LIBPROP_CPPFLAGS = -D_GNU_SOURCE
|
2011-01-15 16:29:44 +05:30
|
|
|
LIBPROP_CFLAGS = -Wno-old-style-definition -Wno-cast-qual -Wno-unused-parameter
|
2010-04-20 17:52:38 +05:30
|
|
|
|
|
|
|
ifdef USE_EXTERNAL_PROPLIB
|
|
|
|
LIBPROP_OBJS =
|
|
|
|
endif
|
|
|
|
|
2009-10-27 06:16:00 +05:30
|
|
|
# libfetch
|
2010-01-19 01:48:26 +05:30
|
|
|
LIBFETCH_OBJS = fetch/common.o fetch/fetch.o fetch/file.o
|
|
|
|
LIBFETCH_OBJS += fetch/ftp.o fetch/http.o
|
2011-01-25 17:30:23 +05:30
|
|
|
LIBFETCH_CPPFLAGS = -D_GNU_SOURCE -DFTP_COMBINE_CWDS -DNETBSD -DINET6 -DWITH_SSL
|
2011-01-15 18:07:16 +05:30
|
|
|
LIBFETCH_CFLAGS = -Wno-error -Wno-unused-macros -Wno-conversion
|
|
|
|
ifdef HAVE_VISIBILITY
|
2010-01-21 07:40:19 +05:30
|
|
|
LIBFETCH_SHLIBCFLAGS = -fvisibility=hidden
|
2011-01-15 18:07:16 +05:30
|
|
|
endif
|
2010-01-19 01:48:26 +05:30
|
|
|
LIBFETCH_INCS = fetch/common.h
|
|
|
|
LIBFETCH_GEN = fetch/ftperr.h fetch/httperr.h
|
2009-10-27 06:16:00 +05:30
|
|
|
|
2011-01-12 21:36:53 +05:30
|
|
|
ifdef USE_EXTERNAL_LIBFETCH
|
|
|
|
LIBFETCH_OBJS =
|
|
|
|
endif
|
|
|
|
|
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
|
|
|
|
OBJS += package_remove.o package_remove_obsoletes.o package_state.o
|
|
|
|
OBJS += package_unpack.o package_requiredby.o package_register.o
|
2011-06-04 17:07:53 +05:30
|
|
|
OBJS += package_purge.o package_replaces.o
|
2011-02-01 05:51:54 +05:30
|
|
|
OBJS += transaction_dictionary.o transaction_sortdeps.o
|
2011-06-04 19:12:50 +05:30
|
|
|
OBJS += download.o fexec.o humanize_number.o plist.o
|
2011-02-05 16:36:03 +05:30
|
|
|
OBJS += plist_archive_entry.o plist_find.o plist_remove.o
|
2011-06-04 17:07:53 +05:30
|
|
|
OBJS += plist_fetch.o util.o mkpath.o initend.o
|
|
|
|
OBJS += regpkgdb_dictionary.o match.o dewey.o
|
2011-06-01 13:07:32 +05:30
|
|
|
OBJS += repository_findpkg.o repository_finddeps.o
|
2010-11-04 00:38:33 +05:30
|
|
|
OBJS += repository_pool.o repository_sync_index.o
|
2010-05-20 02:08:27 +05:30
|
|
|
OBJS += $(COMPAT_SRCS)
|
2009-10-27 06:16:00 +05:30
|
|
|
|
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
|
|
|
|
2010-01-19 01:48:26 +05:30
|
|
|
fetch/ftperr.h: fetch/ftp.errors
|
2010-01-24 18:29:58 +05:30
|
|
|
@printf " [GEN]\t\t$@\n"
|
2011-01-15 15:19:35 +05:30
|
|
|
${SILENT}./fetch/errlist.sh ftp_errlist FTP $< > $@
|
2009-10-27 06:16:00 +05:30
|
|
|
|
2010-01-19 01:48:26 +05:30
|
|
|
fetch/httperr.h: fetch/http.errors
|
2010-01-24 18:29:58 +05:30
|
|
|
@printf " [GEN]\t\t$@\n"
|
2010-01-19 01:48:26 +05:30
|
|
|
@./fetch/errlist.sh http_errlist HTTP $< > $@
|
|
|
|
|
|
|
|
$(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) \
|
2010-01-21 07:40:19 +05:30
|
|
|
$(LIBFETCH_CFLAGS) $(LIBFETCH_SHLIBCFLAGS) -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
|
|
|
|
2010-04-20 17:52:38 +05:30
|
|
|
libxbps.so: $(OBJS) $(LIBFETCH_OBJS) $(LIBPROP_OBJS)
|
2010-01-24 18:29:58 +05:30
|
|
|
@printf " [CCLD]\t\t$@\n"
|
2011-01-15 15:19:35 +05:30
|
|
|
${SILENT}$(CC) $^ $(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
|
|
|
|
2010-04-20 17:52:38 +05:30
|
|
|
libxbps.a: $(OBJS) $(LIBFETCH_OBJS) $(LIBPROP_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"
|
2011-01-15 15:19:35 +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
|
2010-01-24 18:29:58 +05:30
|
|
|
install -d $(DESTDIR)$(LIBDIR)
|
|
|
|
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)
|