]> git.ozlabs.org Git - ppp.git/blob - pppd/Makefile.am
Clang complained about -Wformat in passing a int for %h in snprintf. Result would...
[ppp.git] / pppd / Makefile.am
1 sbin_PROGRAMS = pppd
2 dist_man8_MANS = pppd.8
3 check_PROGRAMS = \
4     utest_chap
5
6 utest_chap_SOURCES = chap_ms.c pppcrypt.c utils.c
7 utest_chap_CPPFLAGS = -DUNIT_TEST
8 utest_chap_LDFLAGS =
9
10 TESTS = $(check_PROGRAMS)
11
12 if WITH_SRP
13 sbin_PROGRAMS += srp-entry
14 dist_man8_MANS += srp-entry.8
15 endif
16
17 pkgconfigdir   = $(libdir)/pkgconfig
18 pkgconfig_DATA = pppd.pc
19
20 pppd_includedir = $(includedir)/pppd
21 pppd_include_HEADERS = \
22     cbcp.h \
23     ccp.h \
24     chap-md5.h \
25     chap_ms.h \
26     chap-new.h \
27     eap.h \
28     eap-tls.h \
29     ecp.h \
30     eui64.h \
31     fsm.h \
32     ipcp.h \
33     ipv6cp.h \
34     ipxcp.h \
35     lcp.h \
36     magic.h \
37     md4.h \
38     md5.h \
39     mppe.h \
40     pppdconf.h \
41     patchlevel.h \
42     pathnames.h \
43     pppcrypt.h \
44     pppd.h \
45     session.h \
46     sha1.h \
47     spinlock.h \
48     tdb.h \
49     upap.h 
50
51 pppd_SOURCES = \
52     auth.c \
53     ccp.c \
54     chap-md5.c \
55     chap-new.c \
56     demand.c \
57     eap.c \
58     ecp.c \
59     fsm.c \
60     ipcp.c \
61     lcp.c \
62     magic.c \
63     main.c \
64     options.c \
65     session.c \
66     tty.c \
67     upap.c \
68     utils.c
69
70 pppd_CPPFLAGS = -I${top_srcdir}/include -DPPPD_RUNTIME_DIR='"@PPPD_RUNTIME_DIR@"' -DPPPD_LOGFILE_DIR='"@PPPD_LOGFILE_DIR@"'
71 pppd_LDFLAGS =
72 pppd_LIBS =
73
74 if LINUX
75 pppd_SOURCES += sys-linux.c
76 pppd_LIBS += $(CRYPT_LIBS) $(UTIL_LIBS)
77 endif
78
79 if SUNOS
80 pppd_SOURCES += sys-solaris.c
81 pppd_LIBS += -lsocket -lnsl
82 endif
83
84 if WITH_CHAPMS
85 pppd_SOURCES += chap_ms.c
86 pppd_SOURCES += pppcrypt.c
87 else
88 if WITH_SRP
89 pppd_SOURCES += pppcrypt.c
90 endif
91 endif
92
93 if WITH_CBCP
94 pppd_SOURCES += cbcp.c
95 endif
96
97 if WITH_IPXCP
98 pppd_SOURCES += ipxcp.c
99 endif
100
101 if WITH_MPPE
102 pppd_SOURCES += mppe.c
103 endif
104
105 if WITH_FILTER
106 pppd_CPPFLAGS += $(PCAP_CFLAGS)
107 pppd_LDFLAGS += $(PCAP_LDFLAGS)
108 pppd_LIBS += $(PCAP_LIBS)
109 endif
110
111 if WITH_PLUGINS
112 pppd_CPPFLAGS += -DPPPD_PLUGIN_DIR='"@PPPD_PLUGIN_DIR@"'
113 pppd_LIBS += -ldl
114 if LINUX
115 pppd_LDFLAGS += -Wl,-E
116 endif
117 endif
118
119 if WITH_MULTILINK
120 pppd_SOURCES += multilink.c
121 endif
122
123 if WITH_TDB
124 pppd_SOURCES += tdb.c spinlock.c
125 endif
126
127 if WITH_INET6
128 pppd_SOURCES += ipv6cp.c eui64.c
129 endif
130
131 if WITH_PAM
132 pppd_LIBS += -lpam -ldl
133 endif
134
135 if WITH_EAPTLS
136 pppd_SOURCES += eap-tls.c
137 endif
138
139 if !WITH_OPENSSL
140 pppd_SOURCES += md5.c md4.c sha1.c
141 utest_chap_SOURCES += md5.c md4.c sha1.c
142 else
143 pppd_CPPFLAGS += $(OPENSSL_INCLUDES)
144 pppd_LDFLAGS += $(OPENSSL_LDFLAGS)
145
146 utest_chap_CPPFLAGS += $(OPENSSL_INCLUDES)
147 utest_chap_LDFLAGS += $(OPENSSL_LDFLAGS)
148 utest_chap_LDADD = $(OPENSSL_LIBS)
149
150 pppd_LIBS += $(OPENSSL_LIBS)
151 if !OPENSSL_HAVE_SHA
152 pppd_SOURCES += sha1.c
153 utest_chap_SOURCES += sha1.c
154 endif
155 if !OPENSSL_HAVE_MD4
156 pppd_SOURCES += md4.c
157 utest_chap_SOURCES += md4.c
158 endif
159 if !OPENSSL_HAVE_MD5
160 pppd_SOURCES += md5.c
161 utest_chap_SOURCES += md5.c
162 endif
163 endif
164
165 if WITH_SYSTEMD
166 pppd_LIBS += -lsystemd
167 endif
168
169 if WITH_SRP
170 srp_entry_SOURCES = srp-entry.c
171 srp_entry_CPPFLAGS = $(OPENSSL_INCLUDES) $(SRP_CFLAGS)
172 srp_entry_LDADD = $(SRP_LIBS) $(OPENSSL_LIBS)
173 srp_entry_LDFLAGS = $(OPENSSL_LDFLAGS) $(SRP_LDFLAGS)
174
175 pppd_CPPFLAGS += $(SRP_CFLAGS)
176 pppd_LDFLAGS += $(SRP_LDFLAGS)
177 pppd_LIBS += $(SRP_LIBS)
178 endif
179
180 pppd_LDADD = $(pppd_LIBS)
181
182 EXTRA_DIST = \
183     ppp.pam