tunblick/third_party/Makefile

Wed, 10 Feb 2010 21:25:01 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 10 Feb 2010 21:25:01 +0100
changeset 18
8ec65b8f6e2c
parent 1
1a5334dfb21d
permissions
-rw-r--r--

Extend uac_auth() of the UAC module to workaround CSEQ problems.
This logic is meant to complement that of changeset 17, which
added rich authentication credentials to the gw table and its
associated logic in the LCR module.

michael@1 1 # This Makefile builds all the third_party code
michael@1 2 # It shouldn't be called by anything other than automated scripts
michael@1 3
michael@1 4 # Both lzo and openvpn should be built universally
michael@3 5 # MSvB: ...using four architectures i386, x86_64, ppc, and ppc64
michael@1 6
michael@3 7 HOSTARCH=x86_64
michael@3 8 LZO_DIR=lzo-2.03
michael@1 9 PKCS11_DIR=pkcs11-helper-1.07
michael@1 10
michael@3 11 all: tuntap openvpn
michael@1 12
michael@3 13 pkcs11-helper:
michael@3 14 echo Configure PKCS11-Helper 32/64 bit universal library
michael@3 15 cd $(PKCS11_DIR) && OPENSSL_CFLAGS="-I/usr/include" OPENSSL_LIBS="-L/usr/lib -lssl -lcrypto" CFLAGS="-isysroot /Developer/SDKs/MacOSX10.5.sdk -Os -mmacosx-version-min=10.5 -arch ppc -arch ppc64 -arch i386 -arch x86_64" ./configure --enable-static --disable-dependency-tracking --prefix=$$(pwd)/staging/ --includedir=$$(pwd)/staging/include/
michael@3 16 echo Build PKCS11-Helper 32/64 bit universal binary
michael@3 17 $(MAKE) -C $(PKCS11_DIR)
michael@3 18 echo Install to third_party/$(PKCS11_DIR)/staging
michael@3 19 $(MAKE) -C $(PKCS11_DIR) install
michael@1 20
michael@3 21 lzo:
michael@3 22 @for a in ppc ppc64 i386 x86_64; do \
michael@1 23 echo Configure LZO for $$a; \
michael@1 24 cd $(LZO_DIR); \
michael@1 25 echo Forcefully be clean; \
michael@1 26 $(MAKE) clean; \
michael@3 27 CFLAGS="-isysroot /Developer/SDKs/MacOSX10.5.sdk -Os -mmacosx-version-min=10.5 -arch $$a" ./configure --host=$(HOSTARCH) --build=$$a --disable-dependency-tracking --disable-asm --prefix=$$(pwd)/staging_$$a/ --includedir=$$(pwd)/staging/include/; \
michael@1 28 echo Build LZO; \
michael@1 29 $(MAKE); \
michael@1 30 echo Install to third_party/$(LZO_DIR)/staging_$$a; \
michael@1 31 $(MAKE) install; \
michael@3 32 cd ..; \
michael@1 33 done
michael@1 34
michael@1 35 # Use lipo to create a universal library
michael@1 36 mkdir -p $(LZO_DIR)/staging/lib
michael@1 37 lipo $(LZO_DIR)/staging_*/lib/liblzo2.a -create -output $(LZO_DIR)/staging/lib/liblzo2.a
michael@3 38 cp $(LZO_DIR)/staging_i386/lib/liblzo2.la $(LZO_DIR)/staging/lib/
michael@1 39
michael@1 40 # wtf? library was renamed??? move it back so openvpn will build correctly
michael@3 41 cd $(LZO_DIR)/staging/lib; mv liblzo2.a liblzo.a; mv liblzo2.la liblzo.la
michael@1 42
michael@1 43 lzo-clean:
michael@1 44 $(MAKE) -C $(LZO_DIR) clean
michael@1 45 rm -rf $(LZO_DIR)/staging*
michael@1 46
michael@1 47 openvpn: lzo pkcs11-helper
michael@3 48 echo Configure OpenVPN 32/64 bit universal binary
michael@3 49 cd openvpn && autoreconf -i -v
michael@3 50 cd openvpn && LDFLAGS="-L../$(PKCS11_DIR)/staging/lib/" CFLAGS="-isysroot /Developer/SDKs/MacOSX10.5.sdk -Os -mmacosx-version-min=10.5 -arch ppc -arch ppc64 -arch i386 -arch x86_64" ./configure --with-lzo-headers=../$(LZO_DIR)/staging/include/ --with-lzo-lib=../$(LZO_DIR)/staging/lib/ --with-pkcs11-helper-headers=../$(PKCS11_DIR)/staging/include/ --with-pkcs11-helper-libs=../$(PKCS11_DIR)/staging/lib/ --disable-dependency-tracking
michael@3 51 echo Build OpenVPN 32/64 bit universal binary
michael@3 52 $(MAKE) -C openvpn
michael@1 53
michael@1 54 openvpn-clean:
michael@3 55 $(MAKE) -C openvpn clean
michael@1 56
michael@1 57 .PHONY : tuntap
michael@1 58
michael@1 59 tuntap:
michael@1 60 # Now we'll build the tun/tap driver
michael@3 61 # # MSvB: Patch buildconf for building 64-bit (broken as of 20090728)
michael@3 62 # sed -i .orig \
michael@3 63 # -e 's;-arch ppc;-arch ppc -arch ppc64;g' \
michael@3 64 # -e 's;-arch i386;-arch i386 -arch x86_64;g' \
michael@3 65 # tuntap/src/tap/Makefile tuntap/src/tun/Makefile
michael@3 66 # MSvB: Patch buildconf for building with up to date APIs
michael@3 67 sed -i .orig \
michael@3 68 -e 's;MacOSX10.4u.sdk;MacOSX10.5.sdk;g' \
michael@3 69 tuntap/src/tap/Makefile tuntap/src/tun/Makefile
michael@3 70 $(MAKE) -C tuntap
michael@1 71
michael@1 72 tuntap-clean:
michael@3 73 $(MAKE) -C tuntap clean
michael@1 74
michael@1 75 clean: lzo-clean tuntap-clean openvpn-clean

mercurial