ipkg: replace wget with libcurl functions
[project/opkg-lede.git] / Makefile.am
1 #SUBDIRS = etc replace familiar libbb
2 SUBDIRS = etc familiar libbb
3
4 HOST_CPU=@host_cpu@
5 BUILD_CPU=@build_cpu@
6 IPKGLIBDIR=@ipkglibdir@
7 ALL_CFLAGS=-g -O -Wall -DHOST_CPU_STR=\"@host_cpu@\" -DBUILD_CPU=@build_cpu@ -DLIBDIR=\"@libdir@\" -DIPKGLIBDIR=\"@ipkglibdir@\" -DDATADIR=\"@datadir@\"
8
9 bin_PROGRAMS = ipkg-cl
10
11 lib_LTLIBRARIES = libipkg.la
12
13 bin_SCRIPTS = update-alternatives
14
15 interceptdir = $(datadir)/ipkg/intercept
16 intercept_DATA = intercept/ldconfig intercept/depmod intercept/update-modules
17
18 install-data-hook:
19 chmod +x $(DESTDIR)$(datadir)/ipkg/intercept/*
20
21 # ipkg_LDADD = libbb/libbb.a replace/libreplace.a
22
23 #ipkg_cl_LDADD = libipkg.la libbb/libbb.la replace/libreplace.a
24 ipkg_cl_LDADD = libipkg.la libbb/libbb.la
25
26 libipkg_includedir=$(includedir)/libipkg
27
28 libipkg_include_HEADERS= \
29 args.h \
30 conffile.h \
31 conffile_list.h \
32 config.h \
33 hash_table.h \
34 includes.h \
35 ipkg_conf.h \
36 ipkg.h \
37 ipkg_message.h \
38 nv_pair.h \
39 nv_pair_list.h \
40 pkg_depends.h \
41 pkg_dest.h \
42 pkg_dest_list.h \
43 pkg.h \
44 pkg_hash.h \
45 pkg_src.h \
46 pkg_src_list.h \
47 pkg_vec.h \
48 str_list.h \
49 void_list.h \
50 libipkg.h
51
52 #\ replace/replace.h
53
54 #libipkg_la_LIBADD = libbb/libbb.la replace/libreplace.a
55 libipkg_la_LIBADD = libbb/libbb.la $(CURL_LIBS)
56
57 ipkg_core_sources = args.c args.h ipkg.c \
58 user.c user.h
59 ipkg_libcore_sources = args.c args.h libipkg.c libipkg.h ipkg.h\
60 user.c user.h
61 ipkg_cmd_sources = ipkg_cmd.c ipkg_cmd.h \
62 ipkg_configure.c ipkg_configure.h \
63 ipkg_download.c ipkg_download.h \
64 ipkg_install.c ipkg_install.h \
65 ipkg_upgrade.c ipkg_upgrade.h \
66 ipkg_remove.c ipkg_remove.h
67 ipkg_db_sources = ipkg_conf.c ipkg_conf.h \
68 ipkg_utils.c ipkg_utils.h pkg.c pkg.h hash_table.h \
69 pkg_depends.c pkg_depends.h pkg_extract.c pkg_extract.h \
70 hash_table.c pkg_hash.c pkg_hash.h pkg_parse.c pkg_parse.h \
71 pkg_vec.c pkg_vec.h
72 ipkg_list_sources = conffile.c conffile.h conffile_list.c conffile_list.h \
73 nv_pair.c nv_pair.h nv_pair_list.c nv_pair_list.h \
74 pkg_dest.c pkg_dest.h pkg_dest_list.c pkg_dest_list.h \
75 pkg_src.c pkg_src.h pkg_src_list.c pkg_src_list.h \
76 str_list.c str_list.h void_list.c void_list.h
77 ipkg_util_sources = file_util.c file_util.h ipkg_message.h ipkg_message.c md5.c md5.h \
78 sprintf_alloc.c sprintf_alloc.h str_util.c str_util.h \
79 xregex.c xregex.h xsystem.c xsystem.h
80
81 # ipkg_SOURCES = $(ipkg_core_sources) $(ipkg_cmd_sources) $(ipkg_db_sources) \
82 # $(ipkg_util_sources) $(ipkg_list_sources)
83
84 EXTRA_DIST = ipkg.c update-alternatives $(intercept_DATA)
85
86 MAINTAINERCLEANFILES= \
87 configure \
88 Makefile.in \
89 config.guess \
90 config.sub \
91 ltmain.sh \
92 .Makefile.am.swp \
93 aclocal.m4
94
95 libipkg_la_SOURCES = $(ipkg_libcore_sources) $(ipkg_cmd_sources) $(ipkg_db_sources) \
96 $(ipkg_util_sources) $(ipkg_list_sources)
97
98 ipkg_cl_SOURCES = ipkg-frontend.c
99
100 libipkg_la_CFLAGS = -DIPKG_LIB $(ALL_CFLAGS) $(CURL_CFLAGS)
101
102 ipkg_CFLAGS = $(ALL_CFLAGS) $(CURL_CFLAGS)
103
104 ipkg_cl_CFLAGS = -DIPKG_LIB $(ALL_CFLAGS)
105
106 noinst_PROGRAMS = ipkg_hash_test ipkg_extract_test
107
108 ipkg_hash_test_LDADD = libbb/libbb.la
109 ipkg_hash_test_SOURCES = ipkg_hash_test.c $(ipkg_db_sources) $(ipkg_util_sources) $(ipkg_list_sources)
110 ipkg_hash_test_CFLAGS = $(ALL_CFLAGS)
111
112 ipkg_extract_test_LDADD = libbb/libbb.la
113 ipkg_extract_test_SOURCES = ipkg_extract_test.c $(ipkg_db_sources) $(ipkg_util_sources) $(ipkg_list_sources)
114 ipkg_extract_test_CFLAGS = $(ALL_CFLAGS)
115
116 package: all-recursive
117 STRIPPROG=$(STRIP) familiar/rules INSTALL=$$PWD/install-sh binary-arch