2 # Top-level Makefile for cspxutils. Allows build or clean
3 # of all directories in one swoop.
7 SUBDIRS= utilLib aesVect ascTool asymCompat asymPerform asymTest attachLeak \
8 badattr badmac badsig ccSymCompat ccSymTest ccHmacCompat ccHmacClone \
9 ccOneShot ccCtxSize ccPerform ccOpensslCompat contextReuse \
10 cryptTool dbTool dbVerifyKey dhFulltest dhTest dsaPartial ecdhTest \
11 hashClone hashCompat hashTest hashTime hashTimeLibCrypt hashTimeSA keyDate \
12 keyHash keyHashAsym keyStore keyStoreLeak macCompat macTest mdsdump mdsLookup \
13 miniWrap pbeTest perform pubKeyTool randTest rawRsaSig rawSig rsatool \
14 sha2Time sha2Vectors sha2VectorsCdsa sigPerform sigtest \
15 sshKey ssl2Padding symCompat symDelta symTest wrap wrapTest
17 INSTALLDIR=$(DSTROOT)/usr/local/bin
19 # default SRCROOT for clean target
20 SRCROOT ?= $(shell pwd)
23 BUILD_DIR = $(shell echo $(LOCAL_BUILD_DIR))
27 @foreach i in $(SUBDIRS); \
28 if [[ -a $$i ]] then; \
29 echo "=== Making $$i ==="; \
39 make "SPHINX=-DSPHINX"
41 # architecture options
44 make "DEBUG_CFLAGS=-arch x86_64" "CMDLINE_LDFLAGS=-arch x86_64"
47 make "DEBUG_CFLAGS=-arch x86_64 -arch i386" "CMDLINE_LDFLAGS=-arch x86_64 -arch i386"
50 make "DEBUG_CFLAGS=-arch i386" "CMDLINE_LDFLAGS=-arch i386"
53 @foreach i in $(SUBDIRS); \
54 echo "=== Installing $$i ==="; \
56 make install "DSTROOT=$(DSTROOT)" "SYMROOT=$(SYMROOT)" \
57 "OBJROOT=$(OBJROOT)" || exit 1; \
60 install -d -m 0755 $(INSTALLDIR)
61 install -p -m 0755 cspdvt $(INSTALLDIR)
62 echo "** BUILD SUCCEEDED **"
65 @foreach i in $(SUBDIRS); \
66 echo "=== Installing Headers for $$i ==="; \
68 make installhdrs "DSTROOT=$(DSTROOT)" "SYMROOT=$(SYMROOT)" \
69 "OBJROOT=$(OBJROOT)" "SRCROOT=$(SRCROOT)/$$i" \
78 @foreach i in $(SUBDIRS); \
79 if [[ -a $$i ]] then; \
80 echo "=== Cleaning $$i ==="; \
82 make clean "DSTROOT=$(DSTROOT)" "SYMROOT=$(SYMROOT)" \
83 "OBJROOT=$(OBJROOT)" "SRCROOT=$(SRCROOT)/$$i" \
90 @if [[ -z "$(BUILD_DIR)" ]] then; \
91 echo "=== You must set the LOCAL_BUILD_DIR environment variable to make all. ==="; \
94 make 64bitFat || exit(1)
95 cd ../clxutils; make 64bitFat || exit(1)
96 @echo "=== cspxutils and clxutils are ready to run. ==="