OSDN Git Service

import v0.2.5
[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.5"
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
45 #
46 # Common Library
47 #
48 lib_LTLIBRARIES = libopenpts.la
49 libopenpts_la_LDFLAGS = -release $(RELEASE)
50 libopenpts_la_SOURCES = verifier.c ifm.c iml.c ir.c base64.c tpm.c ctx.c \
51 conf.c uml.c fsm.c rm.c log.c action.c prop.c policy.c tss.c nonce.c smbios.c \
52 misc.c snapshot.c reason.c uuid.c collector.c ssh.c target.c
53
54 #ptsc_SOURCES = ptsc.c log.c
55 ptsc_CFLAGS = $(AM_CFLAGS)
56 ptsc_LDFLAGS = $(AM_LDFLAGS)
57 #ptsc_SOURCES = ptsc.c verifier.c ifm.c iml.c ir.c base64.c tpm.c ctx.c \
58 #conf.c uml.c fsm.c rm.c log.c action.c prop.c policy.c tss.c nonce.c smbios.c \
59 #misc.c snapshot.c reason.c uuid.c collector.c ssh.c
60
61 ptsc_SOURCES = ptsc.c
62
63 #ptscd_SOURCES =        ptscd.c verifier.c ifm.c iml.c ir.c base64.c tpm.c ctx.c \
64 #conf.c uml.c fsm.c rm.c log.c action.c prop.c policy.c tss.c nonce.c smbios.c \
65 #misc.c snapshot.c reason.c uuid.c collector.c ssh.c
66 openpts_CFLAGS = $(AM_CFLAGS)
67 openpts_LDFLAGS = $(AM_LDFLAGS)
68 openpts_SOURCES = openpts.c
69
70 #verifier.c ifm.c iml.c ir.c base64.c tpm.c ctx.c \
71 #conf.c uml.c fsm.c rm.c log.c action.c prop.c policy.c nonce.c tss.c misc.c \
72 #snapshot.c reason.c uuid.c ssh.c
73
74
75 # TODO do not call the ctx?
76 uml2dot_CFLAGS = $(AM_CFLAGS)
77 uml2dot_LDFLAGS = $(AM_LDFLAGS)
78 uml2dot_SOURCES = uml2dot.c
79
80
81 ##uml.c fsm.c iml.c tpm.c base64.c action.c prop.c \
82 #policy.c ctx.c nonce.c misc.c tss.c rm.c ir.c snapshot.c conf.c log.c reason.c \
83 #uuid.c ssh.c
84
85 rm2dot_CFLAGS = $(AM_CFLAGS)
86 rm2dot_LDFLAGS = $(AM_LDFLAGS)
87 rm2dot_SOURCES = rm2dot.c
88
89
90 #uml.c fsm.c iml.c tpm.c base64.c action.c prop.c \
91 #policy.c ctx.c nonce.c misc.c rm.c ir.c tss.c snapshot.c conf.c log.c reason.c \
92 #uuid.c ssh.c
93
94 ir2text_CFLAGS = $(AM_CFLAGS)
95 ir2text_LDFLAGS = $(AM_LDFLAGS)
96 ir2text_SOURCES = ir2text.c
97
98 #base64.c log.c
99
100
101
102
103
104 if HAVE_LIBUUID
105 #ptscd_SOURCES += uuid_libuuid.c
106 #ptsc_SOURCES += uuid_libuuid.c
107 #openpts_SOURCES += uuid_libuuid.c
108 #uml2dot_SOURCES += uuid_libuuid.c
109 #rm2dot_SOURCES += uuid_libuuid.c
110
111 libopenpts_la_SOURCES +=  uuid_libuuid.c
112
113 AM_CPPFLAGS += -DCONFIG_LIBUUID
114 else
115 # libc AIX, FreeBSD
116 #ptscd_SOURCES += uuid_libc.c
117 #ptsc_SOURCES += uuid_libc.c
118 #openpts_SOURCES += uuid_libc.c
119 #uml2dot_SOURCES += uuid_libc.c
120 #rm2dot_SOURCES += uuid_libc.c
121 libopenpts_la_SOURCES +=  uuid_libc.c
122 endif
123
124
125 if OPENPTS_BUILD_TSS
126 AM_CPPFLAGS += -DCONFIG_TSS
127
128 iml2text_CFLAGS = $(AM_CFLAGS)
129 iml2text_LDFLAGS = $(AM_LDFLAGS)
130 iml2text_SOURCES = iml2text.c
131
132 #misc.c log.c base64.c
133
134 tpm_createkey_SOURCE = tpm_createkey.c
135 #tss.c log.c
136 tpm_createkey_CFLAGS = $(AM_CFLAGS)
137
138
139 tpm_readpcr_CFLAGS = $(AM_CFLAGS)
140 tpm_readpcr_LDFLAGS = $(AM_LDFLAGS)
141 tpm_readpcr_SOURCE = tpm_readpcr.c
142
143 tpm_extendpcr_CFLAGS = $(AM_CFLAGS)
144 tpm_extendpcr_LDFLAGS = $(AM_LDFLAGS)
145 tpm_extendpcr_SOURCE = tpm_extendpcr.c
146
147 bin_PROGRAMS += tpm_createkey iml2text tpm_readpcr tpm_extendpcr
148 else
149 AM_CPPFLAGS += -DCONFIG_NO_TSS
150 endif
151
152
153
154 if OPENPTS_BUILD_LIBTNC
155 lib_LTLIBRARIES += libopenpts_imc.la libopenpts_imv.la
156
157 libopenpts_imc_la_SOURCES = imc.c
158 libopenpts_imc_la_CFLAGS = $(AM_CFLAGS) -I../include/tnc
159 libopenpts_imc_la_LDFLAGS = -release $(RELEASE)
160 libopenpts_imc_la_LIBADD = $(AM_LDFLAGS) 
161
162 libopenpts_imv_la_SOURCES = imv.c
163 libopenpts_imv_la_CFLAGS = $(AM_CFLAGS) -I../include/tnc
164 libopenpts_imv_la_LDFLAGS = -release $(RELEASE)
165 libopenpts_imv_la_LIBADD = $(AM_LDFLAGS) 
166
167 else
168 AM_CPPFLAGS += -DCONFIG_NO_LIBTNC
169 endif
170
171
172 if OPENPTS_BUILD_AIDE
173 AM_CPPFLAGS += -DCONFIG_AIDE
174 bin_PROGRAMS += iml2aide
175 #ptscd_SOURCES += aide.c
176 #ptsc_SOURCES += aide.c
177 #openpts_SOURCES += aide.c
178 #uml2dot_SOURCES += aide.c # ctx.c nonce.c
179 #rm2dot_SOURCES += aide.c
180
181 libopenpts_la_SOURCES +=  aide.c
182
183 iml2aide_CFLAGS = $(AM_CFLAGS)
184 iml2aide_LDFLAGS = $(AM_LDFLAGS)
185 iml2aide_SOURCES = iml2aide.c
186
187
188 # verifier.c ifm.c iml.c ir.c base64.c tpm.c ctx.c \
189 #conf.c uml.c fsm.c rm.c log.c action.c prop.c policy.c nonce.c tss.c aide.c \
190 #misc.c snapshot.c reason.c uuid.c ssh.c
191
192 #if HAVE_LIBUUID
193 #iml2aide_SOURCES += uuid_libuuid.c
194 #else
195 #iml2aide_SOURCES += uuid_libc.c
196 #endif
197 endif
198
199 if OPENPTS_BUILD_TBOOT
200 AM_CPPFLAGS += -DCONFIG_TBOOT
201 bin_PROGRAMS += tboot2iml
202 tboot2iml_CFLAGS = $(AM_CFLAGS)
203 tboot2iml_LDFLAGS = $(AM_LDFLAGS)
204 tboot2iml_SOURCES = tboot2iml.c
205 #log.c misc.c
206 endif
207
208
209 if OPENPTS_BUILD_SQLITE
210 AM_CPPFLAGS += -DCONFIG_SQLITE
211 #LDADD += -lsqlite3
212 AM_LDFLAGS += $(SQLITE_LIBS)
213 endif
214
215 if OPENPTS_BUILD_PQ
216 AM_CPPFLAGS += -DCONFIG_PQ
217 AM_LDFLAGS += $(PQ_LIBS)
218 #LDADD += -lpq
219 endif
220
221 LDADD = $(LIBOBJS)
222
223 #IBMSTART
224 if OPENPTS_BUILD_AUTO_RM_UPDATE
225 AM_CPPFLAGS += -DCONFIG_AUTO_RM_UPDATE
226 #ptscd_SOURCES += aru.c
227 #ptsc_SOURCES += aru.c
228 #openpts_SOURCES += aru.c
229 #uml2dot_SOURCES += aru.c ifm.c
230 #rm2dot_SOURCES += aru.c ifm.c
231
232 libopenpts_la_SOURCES +=  aru.c
233
234 #if OPENPTS_BUILD_AIDE
235 #iml2aide_SOURCES += aru.c
236 #endif
237 endif
238 #IBMEND
239
240 clean-local:
241         @rm -rf *~
242         @rm -rf *.gcda
243         @rm -rf *.gcno
244         @rm -rf *.stat
245