-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
2425 lines (1962 loc) · 95.4 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# zxid/Makefile - How to build ZXID (try: make help)
# Copyright (c) 2012-2014 Synergetics SA (sampo@synergetics.be), All Rights Reserved.
# Copyright (c) 2010-2011 Sampo Kellomaki (sampo@iki.fi), All Rights Reserved.
# Copyright (c) 2006-2009 Symlabs (symlabs@symlabs.com), All Rights Reserved.
# Author: Sampo Kellomaki (sampo@iki.fi)
# This is confidential unpublished proprietary source code of the author.
# NO WARRANTY, not even implied warranties. Contains trade secrets.
# Distribution prohibited unless authorized in writing.
# Licensed under Apache License 2.0, see file COPYING.
# $Id: Makefile,v 1.154 2010-01-08 02:10:09 sampo Exp $
# 15.10.2006, refactor sources to be per namespace --Sampo
# 19.1.2006, added new zxid_simple() / Hello World targets and JNI --Sampo
# 26.2.2007, tweaks for the great SOAP merger, WSC support --Sampo
# 3.3.2007, added many service schemata --Sampo
# 22.2.2008, added mod_auth_saml --Sampo
# 14.4.2008, added SAML POST-SimpleSign binding and Orange APIs --Sampo
# 25.8.2009, added improvements from TAS3 workshop in Lisbon --Sampo
# 29.8.2009, merged in smime support --Sampo
# 15.9.2009, added TAS3 packaging --Sampo
# 14.11.2009, added yubikey support --Sampo
# 12.2.2010, added pthread support --Sampo
# 25.2.2010, added gcov support --Sampo
# 15.9.2010, major hacking to support win32cl (MSVC cl compiler, link (ld), and lib (ar) --Sampo
# 6.2.2012, improved multiple config support --Sampo
# 16.8.2012, added zxbusd build --Sampo
# 16.4.2013, added diet64 statically linked targets --Sampo
# 21.6.2013, added mini_httpd --Sampo
# 4.11.2013, reformed the TARGET system; include and lib paths per Debian --Sampo
# 21.11.2013, added zxid_httpd --Sampo
# 9.2.2014, added musl-libc compile --Sampo
#
# Build so far only tested on Linux, Solaris 8, MacOS 10.3, and mingw-w64. This
# makefile needs gmake-3.78 or newer.
# (See dietlibc (fefe.de) Makefile for some useful wizardry.)
# Try `make help'
#
# N.B. Before you edit this file, consider overriding select options in
# localconf.mk (see below for details).
#
# gcc's '-ffunction-sections' + '-fdata-sections' options. (dead code elimn.)
vpath %.c ../zxid
vpath %.h ../zxid
### This is the authorative spot to set version number. Document in Changes file.
### c/zxidvers.h is generated from these, see `make updatevers'
ZXIDVERSION=0x000130
ZXIDREL=1.30
TOP=$(shell pwd)
### Where package is installed (use `make PREFIX=/your/path' to change)
PREFIX=/var/zxid/$(ZXIDREL)
### Where runtime configuration and temporary data is kept.
### If you change the following, be sure to edit zxidconf.h as
### well. N.B. Trailing / (forward slash) is needed.
ZXID_PATH=/var/zxid/
###
### Module selection options (you should enable all, unless building embedded)
###
ENA_SSO=1
ENA_SAML2=1
ENA_FF12=1
ENA_SAML11=1
ENA_WSF=1
ENA_WSF2=1
ENA_WSF11=1
ENA_XACML2=1
ENA_WST=1
ENA_ZXID_HTTPD=1
ENA_SMIME=1
ENA_TAS3=1
### You may supply additional defines on command line.
### make CDEF='-DZXID_CONF_PATH="/opt/zxid/zxid.conf"'
# Advise other software, such as mini_httpd, to use ZXID specific features
CDEF+= -DUSE_ZXID -DUSE_SSL
# Without cURL the Artifact Profile, WSC, and metadata fetch features are disabled.
CDEF+= -DUSE_CURL
# Without OpenSSL signing and signature verification are not possible
CDEF+= -DUSE_OPENSSL
### The CDEF variable can be later overridden or modified in
### one of the target sections or after all in localconf.mk
### The CDEF is used for dependency computation. For actual
### compilation it is added to CFLAGS.
### Environment dependent options and dependency packages.
### The default values are according to their usual locations
### in Ubuntu and Debian based Linux distributions.
# Try find / -name ap_config.h; find / -name apr.h; find / -name mod_auth_basic.so
# apt-get install libapr1-dev
# apt-get install apache2-dev
APACHE_INC ?= -I/usr/include/apache2
APR_INC ?= -I/usr/include/apr-1.0 -I/usr/include/apr-1
APACHE_MODULES ?= /usr/lib/apache2/modules
DIET_ROOT?=/usr/local/dietlibc-0.33
PHP_CONFIG?=php-config
CSHARP_CONFIG?=true
PY_CONFIG?=true
RUBY_CONFIG?=true
###
### Java options (watch out javac running out of heap)
###
JAR?=jar
JAVAC?=javac
JAVAC_FLAGS?=-J-Xmx128m -g
ZXIDJNI_SO?=zxidjava/libzxidjni.so
# JNI library name is very platform dependent (see macosx and mingw)
# find / -name jni.h; find / -name jni_md.h
# apt-get install openjdk-6-jdk
#JNI_INC?=-I/usr/java/include -I/usr/java/include/linux
#JNI_INC?=-I/usr/lib/jvm/java-6-openjdk/include -I/usr/lib/jvm/java-6-openjdk/include/linux
JNI_INC?=-I/usr/lib/jvm/java-6-openjdk-amd64/include -I/usr/lib/jvm/java-6-openjdk-amd64/include/linux
#JNI_INC?=-I/usr/lib/jvm/java-6-openjdk-i386/include -I/usr/lib/jvm/java-6-openjdk-i386/include/linux
#JNI_INC?=-I/usr/lib/jvm/java-6-openjdk-amd64/include -I/usr/lib/jvm/java-6-openjdk-amd64/include/linux
# Path where HttpServlet supplied by your application server resides
# find / -name servlet-api.jar
# sudo apt-get install tomcat6
SERVLET_PATH=../apache-tomcat-5.5.20/common/lib/servlet-api.jar
#SERVLET_PATH=../apache-tomcat-6.0.18/lib/servlet-api.jar
### You may supply additional include paths on command line.
### For example if you compiled the openssl and libcurl from original
### sources, you might specify:
### make CINC='-I/usr/local/include -I/usr/local/ssl/include'
CINC+=-I. -I$(TOP)
### This CINC variable can be later overridden or modified in
### localconf.mk or in one of the target sections. The CINC is
### used for dependency computation. For actual compilation it
### is added to CFLAGS.
### You may supply additional libs and library paths from the command line.
### For example if you compiled the openssl and libcurl from original
### sources, you might specify:
### make LIBS='-L/usr/local/lib -L/usr/local/ssl/lib'
### If you need some special platform dependent libraries afterwards,
### supply them using POSTLIBS, e.g.
### make POSTLIBS='-lxnet -lsocket'
LIBS+= -lcurl -lssl -lcrypto -lz $(POSTLIBS)
#LIBS+= -lpthread -static -lcurl -lssl -lcrypto -lz -dynamic
#LIBS+= -lidn -lrt
#LIBS+= -ldl
### This LIBS variable can be later overridden or modified in
### localconf.mk or in one of the target sections.
### Where commands for build are found (override for cross compiler or Windows)
#CC=ccache gcc
CC?=gcc
# If you want to override LD setting you must supply LD_ALT on command line or use localconf.mk
LD_ALT?=$(CC)
LD=$(LD_ALT)
ARC?=ar -crs
ARX?=ar -x
STRIP?=strip
GCOV?=gcov
LCOV?=lcov
ECHO?=echo
CP?=cp
PERL?=perl
XSD2SG_PL?= ../pd/xsd2sg.pl
XSD2SG?=$(PERL) $(XSD2SG_PL)
PD2TEX_PL?= ../pd/pd2tex
PD2TEX?=$(PERL) $(PD2TEX_PL)
PULVERIZE=$(PERL) ./pulverize.pl
GPERF?=gperf
SWIG?=swig
GENHTML?=genhtml
#SHARED_FLAGS=-shared --export-all-symbols -Wl,--whole-archive -Wl,--allow-multiple-definition
# --export-all-symbols does not seem to work on gcc-4.6.1... try -Wl,--export-dynamic instead
SHARED_FLAGS=-shared -Wl,--export-dynamic -Wl,--whole-archive -Wl,--allow-multiple-definition
SHARED_CLOSE=-Wl,--no-whole-archive
### Form CFLAGS from its components
CDEF+= -D_REENTRANT -DDEBUG
CDEF+= -DMUTEX_DEBUG=1
CFLAGS+= -g -fPIC -fno-strict-aliasing
#CFLAGS += -Os # gcc-3.4.6 miscompiles with -Os on ix86 (2010 --Sampo)
CFLAGS+= -fmessage-length=0
CFLAGS+= -Wall -Wno-parentheses -Wno-unused-label -Wno-unknown-pragmas -Wno-char-subscripts
#LDFLAGS += -Wl,--gc-sections
LIBZXID_A?=libzxid.a
LIBZXID?=-L. -lzxid
PLATFORM_OBJ?=
OUTOPT?=-o
OBJ_EXT?=o
EXE?=
SO?=.so
ifeq ($(ENA_PG),1)
### To compile for profiling your should run make ENA_PG=1
### See also: make gcov, make lcov (and lcovhtml directory), man gcov, man gprof
### N.B. ccache seems to be incompatible with profiling.
$(info Profiling build)
CFLAGS+= -pg -ftest-coverage -fprofile-arcs
LDFLAGS+= -pg -ftest-coverage -fprofile-arcs
else
# -ffunction-sections is incompatible with profiling
CFLAGS+= -ffunction-sections -fdata-sections
# Following ld flags as well as C flag -ffunction-sections are a quest to
# eliminate unused functions from final link.
#LDFLAGS= -Wl,-O -Wl,2 --gc-sections
endif
####################################################################
### Platform dependent options (choose one with `make TARGET=foo')
###
ifeq ($(TARGET),)
# Target guesser (only works for native builds and only of output of uname is the target name)
TARGET=$(shell uname)
$(warning Guessed TARGET=$(TARGET))
endif
ifeq ($(TARGET),Linux)
### Flags for Linux 2.6 native compile (gcc + gnu binutils)
CDEF+=-DLINUX
# Using PTHREAD helps to avoid problems in multithreaded programs, such as Java servlets
CDEF+= -DUSE_PTHREAD -pthread
ifeq ($(DISTRO),fedora)
CDEF+=-DFEDORA
endif
LIBS+=-lpthread
SO_LIBS+=$(LIBS)
# Marks that target has been detected
TARGET_FOUND=1
endif
ifeq ($(TARGET),diet-linux)
CROSS_COMPILE=1
DIETDIR=/usr/local/dietlibc-0.33
CC=$(DIETDIR)/bin/diet gcc
LD=$(DIETDIR)/bin/diet gcc
CDEF+=-DLINUX
# Using PTHREAD helps to avoid problems in multithreaded programs, such as Java servlets
CDEF+= -DUSE_PTHREAD -pthread
CINC= -I. -I$(DIETDIR)/include
# -fno-stack-protector is needed to eliminate unwanted function plrologue code that causes segv
CFLAGS+= -fno-stack-protector
LDFLAGS= -L$(DIETDIR)/lib-i386 -L$(DIETDIR)/lib
LIBS+=-lpthread
# Marks that target has been detected
TARGET_FOUND=1
endif
ifeq ($(TARGET),musl-linux)
CROSS_COMPILE=1
MUSLDIR=/usr/local/musl-0.9.15
CC=$(MUSLDIR)/bin/musl-gcc
LD=$(MUSLDIR)/bin/musl-gcc
CDEF+=-DLINUX
# Using PTHREAD helps to avoid problems in multithreaded programs, such as Java servlets
CDEF+= -DUSE_PTHREAD -pthread
CINC= -I. -I$(MUSLDIR)/include
# -fno-stack-protector is needed to eliminate unwanted function plrologue code that causes segv
CFLAGS+= -fno-stack-protector
LDFLAGS= -L$(MUSLDIR)/lib-i386 -L$(MUSLDIR)/lib
LIBS+=-lpthread
# Marks that target has been detected
TARGET_FOUND=1
endif
ifeq ($(TARGET),xsol8)
### Cross compilation for Solaris 8 target (on Linux host). Invoke as `make TARGET=xsol8'
# You must have the cross compiler installed in /apps/gcc/sol8 and in path. Similarily
# the cross binutils must be in path.
# export PATH=/apps/gcc/sol8/bin:/apps/binutils/sol8/bin:$PATH
SYSROOT=/apps/gcc/sol8/sysroot
CROSS_COMPILE=1
CC=sparc-sun-solaris2.8-gcc
LD=sparc-sun-solaris2.8-gcc
CDEF+=-DSUNOS -DBYTE_ORDER=4321 -DBIG_ENDIAN=4321
# Using PTHREAD helps to avoid problems in multithreaded programs, such as Java servlets
CDEF+= -DUSE_PTHREAD -pthread
LIBS+=-lxnet -lsocket
SO_LIBS+=$(LIBS)
TARGET_FOUND=1
endif
ifeq ($(TARGET),sol8)
### Flags for Solaris 8 native compile (with gc and gnu binutils) (BIG_ENDIAN BYTE_ORDER)
CDEF+=-DSUNOS -DBYTE_ORDER=4321 -DBIG_ENDIAN=4321 -DPATH_MAX=2048 -I/opt/sfw/include -I/usr/sfw/include
# Using PTHREAD helps to avoid problems in multithreaded programs, such as Java servlets
CDEF+= -DUSE_PTHREAD -pthread
LIBS=-R/opt/sfw/lib -R/usr/sfw/lib -lcurl -lssl -lcrypto -lz -lxnet -lsocket
SO_LIBS+=$(LIBS)
SHARED_FLAGS=-shared --export-all-symbols -Wl,-z -Wl,allextract
SHARED_CLOSE=-Wl,-z -Wl,defaultextract
TARGET_FOUND=1
endif
ifeq ($(TARGET),sol8x86)
# Flags for Solaris 8/x86 native compile (with gc and gnu binutils) (LITTLE_ENDIAN BYTE_ORDER)
CDEF+=-DSUNOS -DBYTE_ORDER=1234 -DPATH_MAX=2048 -I/opt/sfw/include -I/usr/sfw/include
# Using PTHREAD helps to avoid problems in multithreaded programs, such as Java servlets
CDEF+= -DUSE_PTHREAD -pthread
LIBS=-R/opt/sfw/lib -R/usr/sfw/lib -lcurl -lssl -lcrypto -lz -lxnet -lsocket
SO_LIBS+=$(LIBS)
SHARED_FLAGS=-shared --export-all-symbols -Wl,-z -Wl,allextract
SHARED_CLOSE=-Wl,-z -Wl,defaultextract
TARGET_FOUND=1
endif
ifeq ($(TARGET),macosx)
#### Flags for MacOS 10 / Darwin native compile (gcc + Apple linker)
# alias ldd='otool -L'
# alias strace=ktrace or dtrace or dtruss
CFLAGS=-g -fPIC -fmessage-length=0 -Wno-unused-label -Wno-unknown-pragmas -fno-strict-aliasing -DMAYBE_UNUSED=''
CDEF+=-DMACOSX
# Using PTHREAD helps to avoid problems in multithreaded programs, such as Java servlets
CDEF+= -DUSE_PTHREAD -pthread
JNI_INC=-I/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Headers
SHARED_FLAGS=-dylib -all_load -bundle
SHARED_CLOSE=
SO_LIBS+=$(LIBS)
ZXIDJNI_SO=zxidjava/libzxidjni.jnilib
#SHARED_FLAGS=-dylib -all_load -keep_private_externs
#OPENSSL_ROOT=/Developer/SDKs/MacOSX10.4u.sdk/usr
#CURL_ROOT=/Developer/SDKs/MacOSX10.4u.sdk/usr
# Try find / -name ap_config.h; find / -name apr.h
APACHE_INC = -I/Developer/SDKs/MacOSX10.6.sdk/usr/include/apache2
APR_INC = -I/Developer/SDKs/MacOSX10.6.sdk/usr/include/apr-1
APACHE_MODULES = /usr/libexec/apache2
MOD_AUTH_SAML_LIBS=-lapr-1
# -lhttpd2core
TARGET_FOUND=1
endif
ifeq ($(TARGET),FreeBSD)
# Some freebsd guesses result "FreeBSD" so we map it to "freebsd"
TARGET=freebsd
endif
ifeq ($(TARGET),freebsd)
### Putative flags for Freebsd compile
CDEF+=-DFREEBSD
# Using PTHREAD helps to avoid problems in multithreaded programs, such as Java servlets
CDEF+= -DUSE_PTHREAD -pthread
LIBS+=-lpthread
SO_LIBS+=$(LIBS)
TARGET_FOUND=1
endif
ifeq ($(TARGET),CYGWIN_NT-6.1)
TARGET=cygwin
endif
ifeq ($(TARGET),cygwin)
### Native Windows build using Cygwin environment and gcc
CDEF+=-DCYGWIN -DUSE_LOCK=dummy_no_flock -DCURL_STATICLIB -DLOCK_UN=0
MOD_AUTH_SAML_LIBS=-lapr-1 -lhttpd2core
SO_LIBS+=$(LIBS)
TARGET_FOUND=1
endif
ifeq ($(TARGET),mingw)
### These options work with late 2010 vintage mingw (x86-mingw32-build-1.0-sh.tar.bz2?)
CP=ln
ZXID_PATH=/c/zxid/
EXE=.exe
SO=.dll
PRECHECK_PREP=precheck_prep_win
CDEF+=-DMINGW -DUSE_LOCK=dummy_no_flock -DCURL_STATICLIB -DUSE_PTHREAD
SO_LIBS= -L/mingw/lib -lcurl -lssl -lcrypto -lz -lssh2 -lidn -lwldap32 -lgdi32 -lwsock32 -lwinmm -lkernel32 -lz
LIBS= -mconsole $(SO_LIBS) -lpthread
# --dll -mdll
SHARED_FLAGS= -mdll -Wl,--add-stdcall-alias -static -Wl,--export-all-symbols -Wl,--whole-archive -Wl,-no-undefined -Wl,--enable-runtime-pseudo-reloc -Wl,--allow-multiple-definition
CFLAGS=-g -fmessage-length=0 -Wno-unused-label -Wno-unknown-pragmas -fno-strict-aliasing -mno-cygwin -D'ZXID_PATH="$(ZXID_PATH)"'
#JNI_INC=-I"C:/Program Files/Java/jdk1.5.0_14/include" -I"C:/Program Files/Java/jdk1.5.0_14/include/win32"
JNI_INC=-I"/cygdrive/c/Program Files (x86)/Java/jdk1.7.0_21/include/" -I"/cygdrive/c/Program Files (x86)/Java/jdk1.7.0_21/include/win32/"
ZXIDJNI_SO=zxidjava/zxidjni.dll
ifeq ($(SHARED),1)
LIBZXID=-L. -lzxiddll
endif
TARGET_FOUND=1
endif
ifeq ($(TARGET),xmingw)
### Cross compilation for MINGW 32bit target (on Linux host).
# Invoke as `make zxid.dll TARGET=xmingw'
# You must have the cross compiler installed in /apps/gcc/mingw and in
# path. Similarily the cross binutils must be in path.
# export PATH=/apps/gcc/mingw/bin:/apps/binutils/mingw/bin:$PATH
#
# For best results use the same cross compiler for compiling the dependency
# libraries like curl, openssl, and zlib. Furthermore: your cross compiler
# should be for MinGW target, not for Cygwin (i.e. default compiler of Cygwin
# may have trouble due to linking against cygwin dependent libraries).
#
# Cross compiling curl
# CPPFLAGS='-I/apps/gcc/mingw/sysroot/include' LDFLAGS='-L/apps/gcc/mingw/sysroot/lib' LIBS='-lz' ./configure --prefix=/usr --with-ssl=/apps/gcc/mingw/sysroot --without-gnutls --enable-thread --enable-nonblocking --host=i586-pc-mingw32 --with-random=/random.txt --disable-shared --enable-static
# # Despite apparent misdetection of ar, the compile finishes
# make
# cp lib/.libs/libcurl* /apps/gcc/mingw/sysroot/lib
# cp -r include/curl/ /apps/gcc/mingw/sysroot/include
#
# Symbol hunting
# undefined reference to `WinMain@16' --> add -Wl,--no-whole-archive after all libs
# undefined reference to `_imp__curl_easy_setopt' --> compile with -DCURL_STATICLIB
# undefined reference to `_imp__curl_easy_strerror' --> compile with -DCURL_STATICLIB
# undefined reference to `timeGetTime@0' --> add -lwinmm
MINGWDIR=/apps/gcc/mingw
SYSROOT=$(MINGWDIR)/sysroot
CROSS_COMPILE=1
EXE=.exe
SO=.dll
CC=$(MINGWDIR)/bin/i586-pc-mingw32-gcc
LD=$(MINGWDIR)/bin/i586-pc-mingw32-gcc
ARC=/apps/binutils/mingw/bin/i586-pc-mingw32-ar -crs
ARX=/apps/binutils/mingw/bin/i586-pc-mingw32-ar -x
PRECHECK_PREP=precheck_prep_win
#CDEF+=-DMINGW -DUSE_LOCK=flock -DCURL_STATICLIB
CDEF+=-DMINGW -DUSE_LOCK=dummy_no_flock -DCURL_STATICLIB -DUSE_PTHREAD
# All dependency libraries are assumed to be in the mingw environment
CINC=-I. -I$(TOP) -I$(SYSROOT)/include
APACHE_INC = -I$(SYSROOT)/include
APR_INC = -I$(SYSROOT)/srclib/apr-util/include
ZXIDJNI_SO=zxidjava/zxidjni.dll
ifeq ($(SHARED),1)
LIBZXID=-L. -lzxiddll
endif
# -lws2_32 -lmingw32 -u _imp__curl_easy_setopt -u _imp__curl_easy_strerror
SO_LIBS= -L$(SYSROOT)/lib -lcurl -lssl -lcrypto -lz -lwinmm -lwsock32 -lgdi32 -lkernel32
LIBS= -mconsole $(SO_LIBS)
# --dll -mdll
#SHARED_FLAGS=-shared --export-all-symbols -Wl,--whole-archive -Wl,-no-undefined -Wl,--enable-runtime-reloc -Wl,--whole-archive
SHARED_FLAGS= -shared -Wl,--add-stdcall-alias --export-all-symbols -Wl,--whole-archive -Wl,-no-undefined -Wl,--enable-runtime-pseudo-reloc -Wl,--allow-multiple-definition
CFLAGS=-g -fmessage-length=0 -Wno-unused-label -Wno-unknown-pragmas -fno-strict-aliasing -mno-cygwin
# java.lang.UnsatisfiedLinkError: Given procedure could not be found
# -mno-cygwin -mrtd -Wl,--kill-at -Wl,--add-stdcall-alias
# http://www.inonit.com/cygwin/jni/helloWorld/c.html
# http://www.1702.org/jniswigdll.html
# http://maba.wordpress.com/2004/07/28/generating-dll-files-for-jni-under-windowscygwingcc/
#/apps/gcc/mingw/bin/i586-pc-mingw32-gcc -o zxid.dll -Wl,--add-stdcall-alias -shared --export-all-symbols -Wl,-whole-archive -Wl,-no-undefined -Wl,--enable-runtime-pseudo-reloc -Wl,--allow-multiple-definition -Wl,--output-def,zxid.def,--out-implib,zxidimp.lib libzxid.a -Wl,-no-whole-archive -L/apps/gcc/mingw/sysroot/lib -L/apps/gcc/mingw/sysroot/lib -lcurl -lssl -lcrypto -lz -lwinmm -lwsock32 -lgdi32 -lkernel32 -mdll
#i586-pc-mingw32-gcc: shared and mdll are not compatible
#make: *** [zxid.dll] Error 1
# remove the -shared flag and it compiles
TARGET_FOUND=1
endif
ifeq ($(TARGET),xmingw64)
### Cross compilation for MINGW64 target (on Linux host).
# Invoke as `make zxid.dll TARGET=xmingw64'
# You must have the cross compiler installed. You can get one from
# http://mingw-w64.sourceforge.net/download.php
#
# For best results use the same cross compiler for compiling the dependency
# libraries like curl, openssl, and zlib. Furthermore: your cross compiler
# should be for MinGW target, not for Cygwin (i.e. default compiler of Cygwin
# may have trouble due to linking against cygwin dependent libraries).
#
# Cross compiling zlib
# export PATH=/apps/mingw/mingw-w64-bin_i686-linux_20130523/bin:$PATH
# ./configure --prefix=/mingw
# CC=x86_64-w64-mingw32-gcc LD=x86_64-w64-mingw32-ld AR=x86_64-w64-mingw32-ar RANLIB=x86_64-w64-mingw32-gcc-ranlib make -e
# cp libz.a /apps/mingw/3.0.0-w64/mingw/lib
# cp zlib.h zconf.h /apps/mingw/3.0.0-w64/mingw/include
#
# Cross compiling openssl
# ./Configure --prefix=/mingw --cross-compile-prefix=x86_64-w64-mingw32- enable-rc5 enable-mdc2 zlib mingw64-cross-debug -I/apps/mingw/3.0.0-w64/x86_64-w64-mingw32/include
# #make depend # error, apparently not needed
# make
# # If you have syntax errors with string "<symlink>" then eliminate
# # symlinks from include/openssl by copying the files directly there.
# #make test # not doable since openssl.exe will not execute on Linux
# cp -Lr include/openssl /apps/mingw/3.0.0-w64/mingw/include
# cp libssl.a libcrypto.a /apps/mingw/3.0.0-w64/mingw/lib
# cp apps/openssl.exe /apps/mingw/3.0.0-w64/mingw/bin-w64
#
# Cross compiling curl
# CPPFLAGS='-I/apps/mingw/3.0.0-w64/mingw/include' LDFLAGS='-L/apps/mingw/3.0.0-w64/mingw/lib' LIBS='-lz' ./configure --prefix=/mingw --with-ssl=/apps/mingw/3.0.0-w64/mingw --without-gnutls -enable-debug --enable-thread --enable-nonblocking --host=x86_64-w64-mingw32 --with-random=/random.txt --disable-shared --enable-static
# make
# cp lib/.libs/libcurl* /apps/mingw/3.0.0-w64/mingw/lib
# cp -r include/curl/ /apps/mingw/3.0.0-w64/mingw/include
# cp src/curl.exe /apps/mingw/3.0.0-w64/mingw/bin-w64
#
# Fix illegal relocation error on linking libws2_32.a
# wget http://www.dependencywalker.com/depends22_x86.zip
# dependes.exe /c /? zxid_httpd.exe
# psutils
# MinGW-W64 Runtime 3.0 (alpha - rev. 5871) 2013-05-21
MINGWDIR=/apps/mingw/mingw-w64-bin_i686-linux_20130523
SYSROOT=$(MINGWDIR)/x86_64-w64-mingw32
CROSS_COMPILE=1
EXE=.exe
SO=.dll
CC=$(MINGWDIR)/bin/x86_64-w64-mingw32-gcc
LD=$(MINGWDIR)/bin/x86_64-w64-mingw32-gcc
ARC=$(MINGWDIR)/bin/x86_64-w64-mingw32-ar -crs
ARX=$(MINGWDIR)/bin/x86_64-w64-mingw32-ar -x
STRIP=$(MINGWDIR)/bin/x86_64-w64-mingw32-strip
PRECHECK_PREP=precheck_prep_win
#CDEF+=-DMINGW -DUSE_LOCK=flock -DCURL_STATICLIB
CDEF+=-DMINGW -DUSE_LOCK=dummy_no_flock -DCURL_STATICLIB -DUSE_PTHREAD
# All dependency libraries are assumed to be in the mingw environment
CINC=-I. -I$(TOP) -I$(SYSROOT)/include
APACHE_INC = -I$(SYSROOT)/include/apache2
APR_INC = -I$(SYSROOT)/include/apr-1
JNI_INC=-I$(SYSROOT)/include
ZXIDJNI_SO=zxidjava/zxidjni.dll
ifeq ($(SHARED),1)
LIBZXID=-L. -lzxiddll
endif
# -lws2_32 -lwldap32 -lmingw64 -lcrtdll -u _imp__curl_easy_setopt -u _imp__curl_easy_strerror
SO_LIBS= -L$(SYSROOT)/lib -lcurl -lssl -lcrypto -lz -lws2_32 -lwldap32 -lcrypt32 -lwinmm -lwsock32 -lgdi32 -lkernel32
LIBS= -mconsole $(SO_LIBS)
# --dll -mdll
#SHARED_FLAGS=-shared --export-all-symbols -Wl,--whole-archive -Wl,-no-undefined -Wl,--enable-runtime-reloc -Wl,--whole-archive
SHARED_FLAGS= -shared -Wl,--add-stdcall-alias -Wl,--whole-archive -Wl,-no-undefined -Wl,--enable-runtime-pseudo-reloc -Wl,--allow-multiple-definition
CFLAGS=-g -fmessage-length=0 -Wno-unused-label -Wno-unknown-pragmas -fno-strict-aliasing
TARGET_FOUND=1
endif
ifeq ($(TARGET),xmingw64b)
### Cross compilation for MINGW64 target (on Ubuntu Linux host).
# Invoke as `make zxid.dll TARGET=xmingw64b'
# This target was tested with Ubuntu/Debian supplied mingw-w64 cross compiler package
# apt-get install mingw-w64
#
# For best results use the same cross compiler for compiling the dependency
# libraries like curl, openssl, and zlib. Furthermore: your cross compiler
# should be for MinGW target, not for Cygwin (i.e. default compiler of Cygwin
# may have trouble due to linking against cygwin dependent libraries).
#
# Cross compiling zlib
# export PATH=/usr/bin:/bin
# ./configure --prefix=/usr/x86_64-w64-mingw32
# make CC=x86_64-w64-mingw32-gcc LD=x86_64-w64-mingw32-ld AR=x86_64-w64-mingw32-ar RANLIB=x86_64-w64-mingw32-gcc-ranlib
# # compilation fails when trying to create .so, but the .a has been built by then
# cp libz.a /usr/x86_64-w64-mingw32/lib
# cp zlib.h zconf.h /usr/x86_64-w64-mingw32/include
#
# Cross compiling openssl
# ./Configure --prefix=/usr/x86_64-w64-mingw32 --cross-compile-prefix=x86_64-w64-mingw32- enable-rc5 enable-mdc2 zlib mingw64-cross-debug
# #make depend # error, apparently not needed
# make
# # If you have syntax errors with string "<symlink>" then eliminate
# # symlinks from include/openssl by copying the files directly there.
# #make test # not doable since openssl.exe will not execute on Linux
# cp -Lr include/openssl /usr/x86_64-w64-mingw32/include
# cp libssl.a libcrypto.a /usr/x86_64-w64-mingw32/lib
# cp apps/openssl.exe /usr/x86_64-w64-mingw32/bin
#
# Cross compiling curl
# CPPFLAGS='-I/usr/x86_64-w64-mingw32/include' LDFLAGS='-L/usr/x86_64-w64-mingw32/lib' LIBS='-lz' ./configure --prefix=/usr/x86_64-w64-mingw32 --with-ssl=/usr/x86_64-w64-mingw32 --without-gnutls -enable-debug --enable-thread --enable-nonblocking --host=x86_64-w64-mingw32 --with-random=/random.txt --disable-shared --enable-static
# make
# cp lib/.libs/libcurl* /usr/x86_64-w64-mingw32/lib
# cp -r include/curl/ /usr/x86_64-w64-mingw32/include
# cp src/curl.exe /usr/x86_64-w64-mingw32/bin
# apt-get install mingw-w64
# MinGW-W64 Runtime 1.0 (stable - rev. 0) 0000-00-00
MINGWDIR=/usr
SYSROOT=$(MINGWDIR)/x86_64-w64-mingw32
CROSS_COMPILE=1
EXE=.exe
SO=.dll
CC=$(MINGWDIR)/bin/x86_64-w64-mingw32-gcc
LD=$(MINGWDIR)/bin/x86_64-w64-mingw32-gcc
ARC=$(MINGWDIR)/bin/x86_64-w64-mingw32-ar -crs
ARX=$(MINGWDIR)/bin/x86_64-w64-mingw32-ar -x
PRECHECK_PREP=precheck_prep_win
#CDEF+=-DMINGW -DUSE_LOCK=flock -DCURL_STATICLIB
CDEF+=-DMINGW -DUSE_LOCK=dummy_no_flock -DCURL_STATICLIB -DUSE_PTHREAD
# All dependency libraries are assumed to be in the mingw environment
CINC=-I. -I$(TOP) -I$(SYSROOT)/include
APACHE_INC = -I$(SYSROOT)/include
APR_INC = -I$(SYSROOT)/srclib/apr-util/include
JNI_INC=-I$(SYSROOT)/include
ZXIDJNI_SO=zxidjava/zxidjni.dll
ifeq ($(SHARED),1)
LIBZXID=-L. -lzxiddll
endif
# -lws2_32 -lwldap32 -lmingw64 -lcrtdll -u _imp__curl_easy_setopt -u _imp__curl_easy_strerror
SO_LIBS= -L$(SYSROOT)/lib -lcurl -lssl -lcrypto -lz -lws2_32 -lwldap32 -lcrypt32 -lwinmm -lwsock32 -lgdi32 -lkernel32
LIBS= -mconsole $(SO_LIBS)
# --dll -mdll
#SHARED_FLAGS=-shared --export-all-symbols -Wl,--whole-archive -Wl,-no-undefined -Wl,--enable-runtime-reloc -Wl,--whole-archive
SHARED_FLAGS= -shared -Wl,--add-stdcall-alias -Wl,--whole-archive -Wl,-no-undefined -Wl,--enable-runtime-pseudo-reloc -Wl,--allow-multiple-definition
CFLAGS=-g -fmessage-length=0 -Wno-unused-label -Wno-unknown-pragmas -fno-strict-aliasing
TARGET_FOUND=1
endif
ifeq ($(TARGET),win32cl)
### Native Compilation with Microsoft Visual C++ compiler's command line (aka msvc)
CP=copy
CC=cl
LD=link
ARC=lib
CDEF+=-DMINGW -DWIN32CL -DUSE_LOCK=flock -DCURL_STATICLIB -DUSE_PTHREAD
CURL_ROOT="G:/cvsdev/libcurl-7.19.3-win32-ssl-msvc"
OPENSSL_ROOT="C:/OpenSSL"
ZLIB_ROOT="C:/Program Files/GnuWin32"
CINC=-I. -I$(TOP) -I"$(CURL_ROOT)/include" -I"$(OPENSSL_ROOT)/include" -I"$(ZLIB_ROOT)/include"
JNI_INC=-I"C:/Program Files/Java/jdk1.5.0_14/include" -I"C:\Program Files\Java\jdk1.5.0_14\include\win32"
WIN_DDL_LIBS= -LIBPATH:$(CURL_ROOT)/lib/Debug -LIBPATH:$(OPENSSL_ROOT)/lib/VC -LIBPATH:$(ZLIB_ROOT)/lib curllib.lib libeay32MD.lib ssleay32MD.lib zlib.lib kernel32.lib user32.lib winmm.lib Ws2_32.lib
LIBS= $(SO_LIBS)
#SHARED_FLAGS=-LDd -MDd -shared --export-all-symbols
#SHARED_CLOSE=/SUBSYSTEM:WINDOWS
SHARED_FLAGS=-DLL -shared --export-all-symbols
SHARED_CLOSE=
CFLAGS=-Zi -WL -DMAYBE_UNUSED=''
#CFLAGS+=-Yd
OUTOPT=-OUT:
OBJ_EXT=obj
EXE=.exe
SO=.dll
PLATFORM_OBJ=zxdirent.obj
LIBZXID_A=zxid.lib
GPERF=gperf.exe
SHELL="C:\Program Files\GNU Utils\bin"
MAKESHELL="C:\Program Files\GNU Utils\bin"
ZXIDJNI_SO=zxidjava/zxidjni.dll
ifeq ($(SHARED),1)
LIBZXID=-L. -lzxiddll
else
LIBZXID=zxid.lib
endif
TARGET_FOUND=1
endif
ifeq ($(TARGET_FOUND),)
$(error TARGET $(TARGET) not found. Run make help)
endif
### To change any of the above options, you can either supply
### alternate values on make command line, like `make PREFIX=/your/path'
### or you can create localconf.mk file to hold your options. This
### file is included here, but if it's missing, no problem.
-include localconf.mk
####################################################################
### End of platform dependent options (mortals can look, but
### should not edit below this line).
ifeq ($(V),)
$(info Nonverbose build (use make V=1 to enable verbose build).)
$(info TARGET=$(TARGET))
$(info TOP=$(TOP))
$(info CC=$(CC))
$(info CFLAGS=$(CFLAGS))
$(info CDEF=$(CDEF))
$(info CINC=$(CINC))
$(info LD=$(LD))
$(info LDFLAGS=$(LDFLAGS))
$(info LIBS=$(LIBS))
$(info --------------------------)
endif
#CFLAGS += $(CDEF) $(CINC)
# Avoid make's built-in implicit rules and variables; do not print entry msg
.SUFFIXES:
MAKEFLAGS= -rR --no-print-directory
ifeq ($(V),1)
ifeq ($(TARGET),win32cl)
%.obj: %.c
$(CC) $(CFLAGS) $(CDEF) $(CINC) -Fo$@ -c $<
else
%.$(OBJ_EXT): %.c
$(CC) $(OUTOPT)$@ -c $< $(CFLAGS) $(CDEF) $(CINC)
endif
%$(EXE): %.$(OBJ_EXT)
$(LD) $(OUTOPT)$@ $< $(LDFLAGS) $(LIBZXID) $(LIBS)
precheck/%$(EXE): precheck/%.$(OBJ_EXT)
$(LD) $(OUTOPT)$@ $< $(LDFLAGS) $(LIBS)
else
ifeq ($(TARGET),win32cl)
%.obj: %.c
@echo " Compiling $<"
@if $(CC) $(CFLAGS) $(CDEF) $(CINC) -Fo$@ -c $< ; then : ; else \
echo Failed command:; echo '$(CC) $(CFLAGS) $(CDEF) $(CINC) -Fo$@ -c $<' ; false; fi
else
%.$(OBJ_EXT): %.c
@echo " Compiling $<"
@if $(CC) $(OUTOPT)$@ -c $< $(CFLAGS) $(CDEF) $(CINC) ; then : ; else \
echo Failed command:; echo '$(CC) $(OUTOPT)$@ -c $< $(CFLAGS) $(CDEF) $(CINC)' ; false; fi
endif
precheck/chk-%$(EXE): precheck/chk-%.$(OBJ_EXT)
@echo " Link exe $@"
@if $(LD) $(OUTOPT)$@ $< $(LDFLAGS) $(LIBS) ; then : ; else \
echo Failed command:; echo '$(LD) $(OUTOPT)$@ $< $(LDFLAGS) $(LIBS)' ; false; fi
%$(EXE): %.$(OBJ_EXT)
@echo " Linking $@"
@if $(LD) $(OUTOPT)$@ $< $(LDFLAGS) $(LIBZXID) $(LIBS) ; then : ; else \
echo Failed command:; echo '$(LD) $(OUTOPT)$@ $< $(LDFLAGS) $(LIBZXID) $(LIBS)' ; false; fi
endif
# Avoid funny character set dependencies
unexport LC_ALL
LC_COLLATE=C
LC_NUMERIC=C
export LC_COLLATE LC_NUMERIC
### Start of dependencies and targets
DEFAULT_EXE= zxidhlo$(EXE) zxididp$(EXE) zxidhlowsf$(EXE) zxidsimple$(EXE) zxidwsctool$(EXE) zxlogview$(EXE) zxidhrxmlwsc$(EXE) zxidhrxmlwsp$(EXE) zxdecode$(EXE) zxcot$(EXE) zxpasswd$(EXE) zxcall$(EXE) zxumacall$(EXE) zxencdectest$(EXE)
ALL_EXE= smime$(EXE) zxidwspcgi$(EXE) zxid_httpd$(EXE) htpasswd$(EXE)
#$(info DEFAULT_EXE=$(DEFAULT_EXE))
default: seehelp precheck $(DEFAULT_EXE)
all: default precheck_apache samlmod phpzxid javazxid apachezxid $(ALL_EXE)
all_minus_perl: default precheck_apache apachezxid phpzxid javazxid $(ALL_EXE)
zxbus: zxbusd zxbustailf zxbuslist
aller: all zxbus app_demo.class
maymay: javazxid app_demo.class
diet64: zxcot-static-x64 zxpasswd-static-x64 zxididp-static-x64 zxidhlo-static-x64 zxlogview-static-x64 zxcall-static-x64 zxumacall-static-x64 zxdecode-static-x64 zxbusd-static-x64 zxbuslist-static-x64 zxbustailf-static-x64
ZXIDHDRS=zx.h zxid.h zxidnoswig.h c/zxidvers.h
ZXID_LIB_OBJ=zxidsimp.$(OBJ_EXT) zxidpool.$(OBJ_EXT) zxidpsso.$(OBJ_EXT) zxidsso.$(OBJ_EXT) zxidslo.$(OBJ_EXT) zxiddec.$(OBJ_EXT) zxidspx.$(OBJ_EXT) zxididpx.$(OBJ_EXT) zxidmni.$(OBJ_EXT) zxidpep.$(OBJ_EXT) zxidpdp.$(OBJ_EXT) zxidmk.$(OBJ_EXT) zxida7n.$(OBJ_EXT) zxidses.$(OBJ_EXT) zxiduser.$(OBJ_EXT) zxidcgi.$(OBJ_EXT) zxidconf.$(OBJ_EXT) zxidecp.$(OBJ_EXT) zxidcdc.$(OBJ_EXT) zxidloc.$(OBJ_EXT) zxidlib.$(OBJ_EXT) zxidmeta.$(OBJ_EXT) zxidmda.$(OBJ_EXT) zxidcurl.$(OBJ_EXT) zxidepr.$(OBJ_EXT) zxida7n.$(OBJ_EXT) ykcrc.$(OBJ_EXT) ykaes.$(OBJ_EXT) $(PLATFORM_OBJ)
ZX_OBJ=c/zx-ns.$(OBJ_EXT) c/zx-attrs.$(OBJ_EXT) c/zx-elems.$(OBJ_EXT) zxlibdec.$(OBJ_EXT) zxlibenc.$(OBJ_EXT) zxlib.$(OBJ_EXT) zxns.$(OBJ_EXT) zxpw.$(OBJ_EXT) zxutil.$(OBJ_EXT) zxbusprod.$(OBJ_EXT) zxlog.$(OBJ_EXT) zxsig.$(OBJ_EXT) zxcrypto.$(OBJ_EXT) akbox_fn.$(OBJ_EXT) match.$(OBJ_EXT) c/license.$(OBJ_EXT)
WSF_OBJ=zxidmkwsf.$(OBJ_EXT) zxidwsf.$(OBJ_EXT) zxidwsc.$(OBJ_EXT) zxidwsp.$(OBJ_EXT) zxiddi.$(OBJ_EXT) zxidim.$(OBJ_EXT) zxidps.$(OBJ_EXT)
OAUTH_OBJ=zxidoauth.$(OBJ_EXT)
SMIME_LIB_OBJ=certauth.$(OBJ_EXT) keygen.$(OBJ_EXT) pkcs12.$(OBJ_EXT) smime-enc.$(OBJ_EXT) smime-qry.$(OBJ_EXT) smime-vfy.$(OBJ_EXT) smimemime.$(OBJ_EXT) smimeutil.$(OBJ_EXT)
ifeq ($(PULVER),1)
# WARNING: THE PULVER OPTIONS ARE NOT CURRENTLY MAINTAINED AND ARE OUT OF DATE!
# Pulverize dependencies. These arrange some source files to be split
# to one-function-per-file format ("pulver") so that GNU ld will only
# pull in those files, i.e. functions, that are actually used. This is
# a workaround for GNU ld not having a dead function elimination
# feature. You should do `make PULVER=1' for production or
# distribution build of this library as that will ensure smallest
# possible binaries for eventual users of the library.
PULVER_DEPS=pulver/c_saml2_dec_c.deps pulver/c_saml2_enc_c.deps \
pulver/c_saml2_aux_c.deps pulver/c_saml2_getput_c.deps \
pulver/c_saml2md_dec_c.deps pulver/c_saml2md_enc_c.deps \
pulver/c_saml2md_aux_c.deps pulver/c_saml2md_getput_c.deps
c_saml2_dec_c_o=$(shell cat pulver/c_saml2_dec_c.deps)
c_saml2_enc_c_o=$(shell cat pulver/c_saml2_enc_c.deps)
c_saml2_aux_c_o=$(shell cat pulver/c_saml2_aux_c.deps)
c_saml2_getput_c_o=$(shell pulver/c_saml2_getput_c.deps)
#pulver/c_saml2_dec_c.deps $(c_saml2_dec_c_o:.$(OBJ_EXT)=.c): c/saml2-dec.c
pulver/c_saml2_dec_c.deps: c/saml2-dec.c
$(PULVERIZE) pulver c/saml2-dec.c >pulver/c_saml2_dec_c.deps
#pulver/c_saml2_enc_c.deps $(c_saml2_enc_c_o:%.$(OBJ_EXT)=%.c): c/saml2-enc.c
pulver/c_saml2_enc_c.deps $(foo:%.o=%.c): c/saml2-enc.c
$(PULVERIZE) pulver c/saml2-enc.c >pulver/c_saml2_enc_c.deps
pulver/c_saml2_aux_c.deps $(c_saml2_aux_c_o:.o=.c): c/saml2-aux.c
$(PULVERIZE) pulver c/saml2-aux.c >pulver/c_saml2_aux_c.deps
pulver/c_saml2_getput_c.deps $(c_saml2_getput_c_o:.o=.c): c/saml2-getput.c
$(PULVERIZE) pulver c/saml2-getput.c >pulver/c_saml2_getput_c.deps
c_saml2md_dec_c_o=$(shell cat pulver/c_saml2md_dec_c.deps)
c_saml2md_enc_c_o=$(shell cat pulver/c_saml2md_enc_c.deps)
c_saml2md_aux_c_o=$(shell cat pulver/c_saml2md_aux_c.deps)
c_saml2md_getput_c_o=$(shell pulver/c_saml2md_getput_c.deps)
pulver/c_saml2md_dec_c.deps $(c_saml2md_dec_c_o:.o=.c): c/saml2md-dec.c
$(PULVERIZE) pulver c/saml2md-dec.c >pulver/c_saml2md_dec_c.deps
pulver/c_saml2md_enc_c.deps $(c_saml2md_enc_c_o:.o=.c): c/saml2md-enc.c
$(PULVERIZE) pulver c/saml2md-enc.c >pulver/c_saml2md_enc_c.deps
pulver/c_saml2md_aux_c.deps $(c_saml2md_aux_c_o:.o=.c): c/saml2md-aux.c
$(PULVERIZE) pulver c/saml2md-aux.c >pulver/c_saml2md_aux_c.deps
pulver/c_saml2md_getput_c.deps $(c_saml2md_getput_c_o:.o=.c): c/saml2md-getput.c
$(PULVERIZE) pulver c/saml2md-getput.c >pulver/c_saml2md_getput_c.deps
#-include pulver/c_saml2_dec_c.deps
#-include pulver/c_saml2_enc_c.deps
#-include pulver/c_saml2_aux_c.deps
#-include pulver/c_saml2_getput_c.deps
ZX_OBJ += \
$(c_saml2_dec_c_o) $(c_saml2md_dec_c_o) \
$(c_saml2_enc_c_o) $(c_saml2md_enc_c_o) \
$(c_saml2_aux_c_o) $(c_saml2md_aux_c_o) \
$(c_saml2_getput_c_o) $(c_saml2md_getput_c_o)
else
### Nonpulver deps
ifeq ($(ENA_SSO),1)
# Nonpulverized build. This will result in bigger binaries because gnu ld does
# not understand to do dead function elimination. However, this is faster to build.
#ZX_OBJ +=
endif
ifeq ($(ENA_WSF),1)
#WSF_OBJ +=
endif
endif
ZXBUSD_OBJ=zxbusd.$(OBJ_EXT) hiios.$(OBJ_EXT) hiinit.$(OBJ_EXT) hitodo.$(OBJ_EXT) hinet.$(OBJ_EXT) hiread.$(OBJ_EXT) hiwrite.$(OBJ_EXT) hiiosdump.$(OBJ_EXT) testping.$(OBJ_EXT) http.$(OBJ_EXT) smtp.$(OBJ_EXT) stomp.$(OBJ_EXT) zxbusdist.$(OBJ_EXT) zxbussubs.$(OBJ_EXT) zxbusent.$(OBJ_EXT)
#
# Schemata and potential xml document roots.
# See also sg/wsf-soap11.sg for a place to "glue" new functions in.
# N.B. As of 0.69 implementation, the search to zx_ns_tab is a linear
# scan, so it pays to place commonly referenced namespaces early in ZX_SG.
#
ZX_SG+=sg/xmldsig-core.sg sg/xenc-schema.sg sg/ec.sg
# SAML 2.0
ifeq ($(ENA_SAML2),1)
ZX_SG+=sg/wsf-soap11.sg sg/saml-schema-assertion-2.0.sg sg/saml-schema-protocol-2.0.sg sg/saml-schema-ecp-2.0.sg sg/liberty-paos-v2.0.sg
ZX_ROOTS+=-r sa:Assertion -r sa:EncryptedAssertion -r sa:NameID -r sa:EncryptedID -r sp:NewID -r sp:AuthnRequest -r sp:Response
ZX_ROOTS+=-r sp:LogoutRequest -r sp:LogoutResponse
ZX_ROOTS+=-r sp:ManageNameIDRequest -r sp:ManageNameIDResponse
ZX_ROOTS+=-r e:Envelope -r e:Header -r e:Body
ZX_SG+=sg/saml-schema-metadata-2.0.sg
ZX_SG+=sg/shibboleth-metadata-1.0.sg
ZX_SG+=sg/sstc-saml-idp-discovery.sg
ZX_ROOTS+=-r md:EntityDescriptor -r md:EntitiesDescriptor
endif
# OASIS XACML 2.0 (and committee draft 1)
ifeq ($(ENA_XACML2),1)
ZX_SG += sg/access_control-xacml-2.0-context-schema-os.sg
ZX_SG += sg/access_control-xacml-2.0-policy-schema-os.sg
ZX_SG += sg/access_control-xacml-2.0-saml-assertion-schema-os.sg
ZX_SG += sg/access_control-xacml-2.0-saml-protocol-schema-os.sg
ZX_SG += sg/xacml-2.0-profile-saml2.0-v2-schema-protocol-cd-1.sg
ZX_SG += sg/xacml-2.0-profile-saml2.0-v2-schema-assertion-cd-1.sg
ZX_ROOTS += -r xasp:XACMLAuthzDecisionQuery -r xasp:XACMLPolicyQuery
ZX_ROOTS += -r xaspcd1:XACMLAuthzDecisionQuery -r xaspcd1:XACMLPolicyQuery
endif
# Liberty ID-WSF 2.0
ifeq ($(ENA_WSF2),1)
ZX_SG += sg/ws-addr-1.0.sg
ZX_SG += sg/wss-secext-1.0.sg sg/wss-util-1.0.sg
ZX_SG += sg/liberty-idwsf-soap-binding.sg sg/liberty-idwsf-soap-binding-v2.0.sg
ZX_SG += sg/liberty-idwsf-security-mechanisms-v2.0.sg sg/liberty-idwsf-disco-svc-v2.0.sg
ZX_SG += sg/liberty-idwsf-interaction-svc-v2.0.sg sg/liberty-idwsf-utility-v2.0.sg
ZX_SG += sg/id-dap.sg sg/liberty-idwsf-subs-v1.0.sg sg/liberty-idwsf-dst-v2.1.sg
ZX_SG += sg/liberty-idwsf-idmapping-svc-v2.0.sg sg/liberty-idwsf-people-service-v1.0.sg
ZX_SG += sg/liberty-idwsf-authn-svc-v2.0.sg sg/xml.sg sg/xsi.sg sg/xs.sg sg/id-mm7-R6-1-4.sg
ZX_SG += sg/lib-id-sis-cb-proto.sg sg/lib-id-sis-cb-cdm.sg sg/liberty-id-sis-gl-v1.0-14.sg
ZX_SG += sg/liberty-idwsf-dp-v1.0.sg sg/liberty-idwsf-idp-v1.0.sg
ZX_SG += sg/liberty-idwsf-pmm-v1.0.sg sg/liberty-idwsf-prov-v1.0.sg
ZX_SG += sg/liberty-idwsf-shps-v1.0.sg
ZX_SG += sg/hr-xml-sampo.sg sg/id-hrxml.sg
ZX_SG += sg/demo-media-v1.0.sg
ZX_ROOTS+= -r a:EndpointReference -r sec:Token
ZX_ROOTS+= -r hrxml:Candidate
#ZX_SG += sg/saml-schema-assertion-2.0.sg sg/saml-schema-protocol-2.0.sg sg/xmldsig-core.sg sg/xenc-schema.sg sg/saml-schema-metadata-2.0.sg sg/oasis-sstc-saml-schema-protocol-1.1.sg sg/oasis-sstc-saml-schema-assertion-1.1.sg sg/liberty-idff-protocols-schema-1.2-errata-v2.0.sg sg/liberty-authentication-context-v2.0.sg
endif
# SAML 1.1
ifeq ($(ENA_SAML11),1)
ZX_SG += sg/oasis-sstc-saml-schema-protocol-1.1.sg sg/oasis-sstc-saml-schema-assertion-1.1.sg
ZX_ROOTS += -r sa11:Assertion -r sp11:Request -r sp11:Response
endif
# Liberty ID-FF 1.2
ifeq ($(ENA_FF12),1)
ZX_SG += sg/liberty-idff-protocols-schema-1.2-errata-v2.0.sg sg/liberty-authentication-context-v2.0.sg
ZX_ROOTS+= -r ff12:Assertion -r ff12:AuthnRequest -r ff12:AuthnResponse
ZX_ROOTS+= -r ff12:AuthnRequestEnvelope -r ff12:AuthnResponseEnvelope
ZX_ROOTS+= -r ff12:RegisterNameIdentifierRequest -r ff12:RegisterNameIdentifierResponse
ZX_ROOTS+= -r ff12:FederationTerminationNotification
ZX_ROOTS+= -r ff12:LogoutRequest -r ff12:LogoutResponse
ZX_ROOTS+= -r ff12:NameIdentifierMappingRequest -r ff12:NameIdentifierMappingResponse
ZX_SG+= sg/liberty-metadata-v2.0.sg
ZX_ROOTS+= -r m20:EntityDescriptor -r m20:EntitiesDescriptor
endif
# Liberty ID-WSF 1.1
ifeq ($(ENA_WSF11),1)
ZX_SG += sg/liberty-idwsf-soap-binding-v1.2.sg sg/liberty-idwsf-security-mechanisms-v1.2.sg
ZX_SG += sg/liberty-idwsf-disco-svc-v1.2.sg sg/liberty-idwsf-interaction-svc-v1.1.sg
endif
# WS-Trust
ifeq ($(ENA_WST),1)
ZX_SG += sg/ws-trust-1.3.sg sg/ws-policy.sg sg/ws-secureconversation-1.3.sg
endif
# TAS3
ifeq ($(ENA_TAS3),1)
ZX_SG += sg/tas3.sg sg/tas3sol.sg
endif
#
# Generated files (the zxid/c subdirectory) (see also Manifest if you add files)
#
ZX_GEN_GPERF=\
c/zx-a.gperf c/zx-di12.gperf c/zx-lu.gperf c/zx-xenc.gperf \
c/zx-ac.gperf c/zx-m20.gperf c/zx-sec.gperf c/zx-exca.gperf \
c/zx-b.gperf c/zx-ds.gperf c/zx-md.gperf c/zx-sec12.gperf \
c/zx-b12.gperf c/zx-e.gperf c/zx-sp.gperf \
c/zx-ff12.gperf c/zx-sa.gperf c/zx-sp11.gperf \
c/zx-is.gperf c/zx-sa11.gperf c/zx-wsse.gperf \
c/zx-di.gperf c/zx-is12.gperf c/zx-sbf.gperf c/zx-wsu.gperf \
c/zx-ecp.gperf c/zx-paos.gperf c/zx-dap.gperf c/zx-ps.gperf \
c/zx-im.gperf c/zx-as.gperf c/zx-subs.gperf c/zx-dst.gperf \
c/zx-cb.gperf c/zx-cdm.gperf c/zx-gl.gperf c/zx-mm7.gperf \
c/zx-wst.gperf c/zx-wsp.gperf c/zx-wsc.gperf \
c/zx-xa.gperf c/zx-xac.gperf c/zx-xasa.gperf c/zx-xasp.gperf \
c/zx-xasacd1.gperf c/zx-xaspcd1.gperf \
c/zx-dp.gperf c/zx-pmm.gperf c/zx-prov.gperf c/zx-idp.gperf c/zx-shps.gperf \
c/zx-demomed.gperf c/zx-hrxml.gperf c/zx-idhrxml.gperf \
c/zx-tas3.gperf c/zx-tas3sol.gperf c/zx-shibmd.gperf c/zx-idpdisc.gperf \
c/zx-xml.gperf
ZX_GEN_H=\
c/zx-a-data.h c/zx-di12-data.h c/zx-lu-data.h c/zx-xenc-data.h \
c/zx-ac-data.h c/zx-m20-data.h c/zx-sec-data.h c/zx-exca-data.h \
c/zx-b-data.h c/zx-ds-data.h c/zx-md-data.h c/zx-sec12-data.h \
c/zx-b12-data.h c/zx-e-data.h c/zx-ns.h c/zx-sp-data.h \
c/zx-ff12-data.h c/zx-sa-data.h c/zx-sp11-data.h \
c/zx-data.h c/zx-is-data.h c/zx-sa11-data.h c/zx-wsse-data.h \
c/zx-di-data.h c/zx-is12-data.h c/zx-sbf-data.h c/zx-wsu-data.h \
c/zx-ecp-data.h c/zx-paos-data.h c/zx-dap-data.h c/zx-ps-data.h \
c/zx-im-data.h c/zx-as-data.h c/zx-subs-data.h c/zx-dst-data.h \
c/zx-cb-data.h c/zx-cdm-data.h c/zx-gl-data.h c/zx-mm7-data.h \
c/zx-wst-data.h c/zx-wsp-data.h c/zx-wsc-data.h \
c/zx-xa-data.h c/zx-xac-data.h c/zx-xasa-data.h c/zx-xasp-data.h \
c/zx-xasacd1-data.h c/zx-xaspcd1-data.h \
c/zx-dp-data.h c/zx-pmm-data.h c/zx-prov-data.h c/zx-idp-data.h c/zx-shps-data.h \
c/zx-demomed-data.h c/zx-hrxml-data.h c/zx-idhrxml-data.h \
c/zx-xsi-data.h c/zx-xs-data.h c/zx-xml-data.h \
c/zx-tas3-data.h c/zx-tas3sol-data.h c/zx-shibmd-data.h c/zx-idpdisc-data.h
ZX_GEN_GETPUT_C= \
c/zx-is-getput.c \
c/zx-di12-getput.c c/zx-sa11-getput.c c/zx-sp11-getput.c \
c/zx-a-getput.c \
c/zx-is12-getput.c \
c/zx-sbf-getput.c c/zx-wsse-getput.c \
c/zx-ac-getput.c \
c/zx-lu-getput.c \
c/zx-ds-getput.c c/zx-wsu-getput.c \