[Verse-cvs] [verse] SVN commit:[4519] New makefile for Leopard ( wo new architectures ppc64 and x86_^$) and -lpam to both OSX Makefiles
Jiri Hnidek
jiri.hnidek at tul.cz
Wed Jan 23 15:44:13 CET 2008
Revision: 4519
https://svn.blender.org//revision/?rev=4519&view=rev
Author: jiri
Date: 2008-01-23 15:44:12 +0100 (Wed, 23 Jan 2008)
Log Message:
-----------
New makefile for Leopard (wo new architectures ppc64 and x86_^$) and -lpam to both OSX Makefiles
Modified Paths:
--------------
branches/verse-pam-branch/Makefile.osx.universal
Added Paths:
-----------
branches/verse-pam-branch/Makefile.osx-10.5.universal
Added: branches/verse-pam-branch/Makefile.osx-10.5.universal
===================================================================
--- branches/verse-pam-branch/Makefile.osx-10.5.universal (rev 0)
+++ branches/verse-pam-branch/Makefile.osx-10.5.universal 2008-01-23 14:44:12 UTC (rev 4519)
@@ -0,0 +1,93 @@
+#
+# Makefile for Verse core; API and reference server.
+# This pretty much requires GNU Make, I think.
+#
+# This build is slightly complicated that part of the C code that
+# needs to go into the API implementation is generated by building
+# and running other C files (this is the protocol definition).
+#
+
+CC ?= gcc
+CFLAGS ?= "-I$(shell pwd)" -Wall -Wextra -Wpointer-arith -Wno-unused-parameter -ansi -g -isysroot /Developer/SDKs/MacOSX10.5.sdk -arch ppc -arch ppc64 -arch i386 -arch x86_64
+LDFLAGS ?= -lpam -pg -Wl,-syslibroot,/Developer/SDKs/MacOSX10.5.sdk -arch ppc -arch ppc64 -arch i386 -arch x86_64
+
+AR ?= ar
+ARFLAGS = -rus
+RANLIB ?= ranlib
+
+TARGETS = libverse.a verse
+
+.PHONY: all clean cleanprot
+
+# Automatically generated protocol things.
+PROT_DEF = $(wildcard v_cmd_def_*.c)
+PROT_TOOL = v_cmd_gen.c $(PROT_DEF)
+PROT_OUT = v_gen_pack_init.c v_gen_unpack_func.h verse.h \
+ $(patsubst v_cmd_def_%.c,v_gen_pack_%_node.c, $(PROT_DEF))
+
+# The API implementation is the protocol code plus a few bits.
+LIBVERSE_SRC = $(PROT_OUT) v_bignum.c v_cmd_buf.c v_connect.c \
+ v_connection.c v_connection.h v_encryption.c \
+ v_func_storage.c v_internal_verse.h v_man_pack_node.c \
+ v_network.c v_network.h v_network_in_que.c v_network_out_que.c \
+ v_pack.c v_pack.h v_pack_method.c v_prime.c v_randgen.c v_util.c
+
+LIBVERSE_OBJ = $(patsubst %h,, $(LIBVERSE_SRC:%.c=%.o))
+
+# The server is a simple 1:1 mapping, so just use wildcards.
+VERSE_SRC = $(wildcard vs_*.c)
+VERSE_OBJ = $(VERSE_SRC:%.c=%.o)
+
+# -----------------------------------------------------
+
+all: $(TARGETS)
+
+verse: $(VERSE_OBJ) libverse.a
+ $(CC) $(LDFLAGS) -o $@ $^
+
+libverse.a: $(LIBVERSE_OBJ)
+ rm -f $@
+ $(AR) $(ARFLAGS) $@ $(LIBVERSE_OBJ)
+
+# -----------------------------------------------------
+
+# Here are the automatically generated pieces of the puzzle.
+# Basically, we generate v_gen_pack_X_node.c files by compiling
+# the v_cmd_def_X.c files together with some driver glue and
+# running the result.
+#
+
+# The autogen outputs all depend on the tool.
+$(PROT_OUT): mkprot
+ ./mkprot
+
+# Build the protocol maker, from the definitions themselves.
+mkprot: $(PROT_TOOL) verse_header.h
+ $(CC) -DV_GENERATE_FUNC_MODE -o $@ $(PROT_TOOL)
+
+# Clean away all the generated parts of the protocol implementation.
+cleanprot: clean
+ rm -f mkprot $(PROT_OUT)
+
+# -----------------------------------------------------
+
+clean:
+ rm -f *.o $(TARGETS)
+
+# -----------------------------------------------------
+
+# Utter ugliness to create release archives. Needs to improve, but should work for a while.
+dist:
+ RELEASE=$$( \
+ R=`grep V_RELEASE_NUMBER verse.h | tr -s ' \t' | tr -d '"\r' | cut -d' ' -f3` ; \
+ P=`grep V_RELEASE_PATCH verse.h | tr -s ' \t' | tr -d '"\r' | cut -d' ' -f3` ; \
+ L=`grep V_RELEASE_LABEL verse.h | tr -s ' \t' | tr -d '"\r' | cut -d' ' -f3` ; echo r$${R}p$$P$$L ) ; \
+ if [ $$RELEASE ]; then ( \
+ rm -rf /tmp/verse; \
+ mkdir -p /tmp/verse; \
+ cp -a * /tmp/verse; \
+ cd /tmp && zip verse-$$RELEASE.zip -r verse -x 'verse/*CVS*' -x 'verse/.*' ; \
+ ); mv /tmp/verse-$$RELEASE.zip . \
+ ;else \
+ echo "Couldn't auto-set RELEASE from verse.h, something is fishy" \
+ ;fi
Modified: branches/verse-pam-branch/Makefile.osx.universal
===================================================================
--- branches/verse-pam-branch/Makefile.osx.universal 2008-01-07 16:39:33 UTC (rev 4518)
+++ branches/verse-pam-branch/Makefile.osx.universal 2008-01-23 14:44:12 UTC (rev 4519)
@@ -9,7 +9,7 @@
CC ?= gcc
CFLAGS ?= "-I$(shell pwd)" -Wall -Wextra -Wpointer-arith -Wno-unused-parameter -ansi -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386
-LDFLAGS ?= -pg -Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386
+LDFLAGS ?= -lpam -pg -Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386
AR ?= ar
ARFLAGS = -rus
More information about the Verse-cvs
mailing list