OSDN Git Service

f15fae9c3a9001194bdf999ca33a047701f19d26
[openpts/openpts.git] / src / Makefile.am
1 #
2 # Makefile.am
3 #
4 # This file is part of the OpenPTS project.
5 #
6 # The Initial Developer of the Original Code is International
7 # Business Machines Corporation. Portions created by IBM
8 # Corporation are Copyright (C) 2010 International Business
9 # Machines Corporation. All Rights Reserved.
10 #
11 # This program is free software; you can redistribute it and/or modify
12 # it under the terms of the Common Public License as published by
13 # IBM Corporation; either version 1 of the License, or (at your option)
14 # any later version.
15 #
16 # This program is distributed in the hope that it will be useful,
17 # but WITHOUT ANY WARRANTY; without even the implied warranty of
18 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19 # Common Public License for more details.
20 #
21 # You should have received a copy of the Common Public License
22 # along with this program; if not, a copy can be viewed at
23 # http://www.opensource.org/licenses/cpl1.0.php.
24 #
25
26 RELEASE = "0.0.2.6"
27
28 # Gettext support
29 localedir = $(datadir)/locale
30
31
32 AM_CPPFLAGS = -I$(top_srcdir)/include $(LIBXML2_CFLAGS) $(TSS_CFLAGS) -I../include -DLOCALEDIR=\"$(localedir)\"
33 AM_LDFLAGS = $(LIBXML2_LIBS) $(LIBCRYPTO_LIBS) $(TSS_LIBS) -lopenpts
34 # $(LIBINTL) -lopenpts
35
36 if HAVE_LIBUUID
37 AM_CPPFLAGS += $(LIBUUID_CFLAGS)
38 AM_LDFLAGS  += $(LIBUUID_LIBS)
39 endif
40
41
42 sbin_PROGRAMS = ptsc
43 bin_PROGRAMS = openpts uml2dot rm2dot ir2text
44 # AIX
45 # ptsevt ptsevtd
46
47 #
48 # Common Library
49 #
50 lib_LTLIBRARIES = libopenpts.la
51 libopenpts_la_LDFLAGS = -release $(RELEASE)
52 libopenpts_la_SOURCES = verifier.c ifm.c iml.c ir.c base64.c tpm.c ctx.c \
53 conf.c uml.c fsm.c rm.c log.c action.c prop.c policy.c tss.c nonce.c smbios.c \
54 misc.c snapshot.c reason.c uuid.c collector.c ssh.c target.c
55
56 #ptsc_SOURCES = ptsc.c log.c
57 ptsc_CFLAGS = $(AM_CFLAGS)
58 ptsc_LDFLAGS = $(AM_LDFLAGS)
59 #ptsc_SOURCES = ptsc.c verifier.c ifm.c iml.c ir.c base64.c tpm.c ctx.c \
60 #conf.c uml.c fsm.c rm.c log.c action.c prop.c policy.c tss.c nonce.c smbios.c \
61 #misc.c snapshot.c reason.c uuid.c collector.c ssh.c
62
63 ptsc_SOURCES = ptsc.c
64
65 #ptscd_SOURCES =        ptscd.c verifier.c ifm.c iml.c ir.c base64.c tpm.c ctx.c \
66 #conf.c uml.c fsm.c rm.c log.c action.c prop.c policy.c tss.c nonce.c smbios.c \
67 #misc.c snapshot.c reason.c uuid.c collector.c ssh.c
68 openpts_CFLAGS = $(AM_CFLAGS)
69 openpts_LDFLAGS = $(AM_LDFLAGS)
70 openpts_SOURCES = openpts.c
71
72 #verifier.c ifm.c iml.c ir.c base64.c tpm.c ctx.c \
73 #conf.c uml.c fsm.c rm.c log.c action.c prop.c policy.c nonce.c tss.c misc.c \
74 #snapshot.c reason.c uuid.c ssh.c
75
76
77 # TODO do not call the ctx?
78 uml2dot_CFLAGS = $(AM_CFLAGS)
79 uml2dot_LDFLAGS = $(AM_LDFLAGS)
80 uml2dot_SOURCES = uml2dot.c
81
82
83 ##uml.c fsm.c iml.c tpm.c base64.c action.c prop.c \
84 #policy.c ctx.c nonce.c misc.c tss.c rm.c ir.c snapshot.c conf.c log.c reason.c \
85 #uuid.c ssh.c
86
87 rm2dot_CFLAGS = $(AM_CFLAGS)
88 rm2dot_LDFLAGS = $(AM_LDFLAGS)
89 rm2dot_SOURCES = rm2dot.c
90
91
92 #uml.c fsm.c iml.c tpm.c base64.c action.c prop.c \
93 #policy.c ctx.c nonce.c misc.c rm.c ir.c tss.c snapshot.c conf.c log.c reason.c \
94 #uuid.c ssh.c
95
96 ir2text_CFLAGS = $(AM_CFLAGS)
97 ir2text_LDFLAGS = $(AM_LDFLAGS)
98 ir2text_SOURCES = ir2text.c
99
100 #base64.c log.c
101
102 ptsevt_CFLAGS = $(AM_CFLAGS)
103 ptsevt_LDFLAGS = $(AM_LDFLAGS)
104 ptsevt_SOURCES = ptsevt.c
105
106 ptsevtd_CFLAGS = $(AM_CFLAGS)
107 ptsevtd_LDFLAGS = $(AM_LDFLAGS) -lrt
108 ptsevtd_SOURCES = ptsevtd.c
109
110
111 if HAVE_LIBUUID
112 #ptscd_SOURCES += uuid_libuuid.c
113 #ptsc_SOURCES += uuid_libuuid.c
114 #openpts_SOURCES += uuid_libuuid.c
115 #uml2dot_SOURCES += uuid_libuuid.c
116 #rm2dot_SOURCES += uuid_libuuid.c
117
118 libopenpts_la_SOURCES +=  uuid_libuuid.c
119
120 AM_CPPFLAGS += -DCONFIG_LIBUUID
121 else
122 # libc AIX, FreeBSD
123 #ptscd_SOURCES += uuid_libc.c
124 #ptsc_SOURCES += uuid_libc.c
125 #openpts_SOURCES += uuid_libc.c
126 #uml2dot_SOURCES += uuid_libc.c
127 #rm2dot_SOURCES += uuid_libc.c
128 libopenpts_la_SOURCES +=  uuid_libc.c
129 endif
130
131
132 if OPENPTS_BUILD_TSS
133 AM_CPPFLAGS += -DCONFIG_TSS
134
135 iml2text_CFLAGS = $(AM_CFLAGS)
136 iml2text_LDFLAGS = $(AM_LDFLAGS)
137 iml2text_SOURCES = iml2text.c
138
139 #misc.c log.c base64.c
140
141 tpm_createkey_SOURCE = tpm_createkey.c
142 #tss.c log.c
143 tpm_createkey_CFLAGS = $(AM_CFLAGS)
144
145
146 tpm_readpcr_CFLAGS = $(AM_CFLAGS)
147 tpm_readpcr_LDFLAGS = $(AM_LDFLAGS)
148 tpm_readpcr_SOURCE = tpm_readpcr.c
149
150 tpm_extendpcr_CFLAGS = $(AM_CFLAGS)
151 tpm_extendpcr_LDFLAGS = $(AM_LDFLAGS)
152 tpm_extendpcr_SOURCE = tpm_extendpcr.c
153
154 bin_PROGRAMS += tpm_createkey iml2text tpm_readpcr tpm_extendpcr
155 else
156 AM_CPPFLAGS += -DCONFIG_NO_TSS
157 endif
158
159
160
161 if OPENPTS_BUILD_LIBTNC
162 lib_LTLIBRARIES += libopenpts_imc.la libopenpts_imv.la
163
164 libopenpts_imc_la_SOURCES = imc.c
165 libopenpts_imc_la_CFLAGS = $(AM_CFLAGS) -I../include/tnc
166 libopenpts_imc_la_LDFLAGS = -release $(RELEASE)
167 libopenpts_imc_la_LIBADD = $(AM_LDFLAGS) 
168
169 libopenpts_imv_la_SOURCES = imv.c
170 libopenpts_imv_la_CFLAGS = $(AM_CFLAGS) -I../include/tnc
171 libopenpts_imv_la_LDFLAGS = -release $(RELEASE)
172 libopenpts_imv_la_LIBADD = $(AM_LDFLAGS) 
173
174 else
175 AM_CPPFLAGS += -DCONFIG_NO_LIBTNC
176 endif
177
178
179 if OPENPTS_BUILD_AIDE
180 AM_CPPFLAGS += -DCONFIG_AIDE
181 bin_PROGRAMS += iml2aide
182 #ptscd_SOURCES += aide.c
183 #ptsc_SOURCES += aide.c
184 #openpts_SOURCES += aide.c
185 #uml2dot_SOURCES += aide.c # ctx.c nonce.c
186 #rm2dot_SOURCES += aide.c
187
188 libopenpts_la_SOURCES +=  aide.c
189
190 iml2aide_CFLAGS = $(AM_CFLAGS)
191 iml2aide_LDFLAGS = $(AM_LDFLAGS)
192 iml2aide_SOURCES = iml2aide.c
193
194
195 # verifier.c ifm.c iml.c ir.c base64.c tpm.c ctx.c \
196 #conf.c uml.c fsm.c rm.c log.c action.c prop.c policy.c nonce.c tss.c aide.c \
197 #misc.c snapshot.c reason.c uuid.c ssh.c
198
199 #if HAVE_LIBUUID
200 #iml2aide_SOURCES += uuid_libuuid.c
201 #else
202 #iml2aide_SOURCES += uuid_libc.c
203 #endif
204 endif
205
206 if OPENPTS_BUILD_TBOOT
207 AM_CPPFLAGS += -DCONFIG_TBOOT
208 bin_PROGRAMS += tboot2iml
209 tboot2iml_CFLAGS = $(AM_CFLAGS)
210 tboot2iml_LDFLAGS = $(AM_LDFLAGS)
211 tboot2iml_SOURCES = tboot2iml.c
212 #log.c misc.c
213 endif
214
215
216
217 if OPENPTS_BUILD_SQLITE
218 AM_CPPFLAGS += -DCONFIG_SQLITE
219 #LDADD += -lsqlite3
220 AM_LDFLAGS += $(SQLITE_LIBS)
221 endif
222
223 if OPENPTS_BUILD_PQ
224 AM_CPPFLAGS += -DCONFIG_PQ
225 AM_LDFLAGS += $(PQ_LIBS)
226 #LDADD += -lpq
227 endif
228
229 LDADD = $(LIBOBJS)
230
231 #IBMSTART
232 if OPENPTS_BUILD_AUTO_RM_UPDATE
233 AM_CPPFLAGS += -DCONFIG_AUTO_RM_UPDATE
234 #ptscd_SOURCES += aru.c
235 #ptsc_SOURCES += aru.c
236 #openpts_SOURCES += aru.c
237 #uml2dot_SOURCES += aru.c ifm.c
238 #rm2dot_SOURCES += aru.c ifm.c
239
240 libopenpts_la_SOURCES +=  aru.c
241
242 #if OPENPTS_BUILD_AIDE
243 #iml2aide_SOURCES += aru.c
244 #endif
245 endif
246 #IBMEND
247
248 clean-local:
249         @rm -rf *~
250         @rm -rf *.gcda
251         @rm -rf *.gcno
252         @rm -rf *.stat
253