2006-08-20 16:09:03 +00:00
|
|
|
#
|
|
|
|
# Makefile for Verse core; API and reference server.
|
|
|
|
# Written by modifying the main GNU Makefile, for nmake.
|
|
|
|
#
|
|
|
|
# It is more hard-coded, relying on less intelligence in
|
|
|
|
# the make tool.
|
|
|
|
#
|
|
|
|
# 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 = cl
|
|
|
|
CFLAGS =
|
|
|
|
LDFLAGS = -pg
|
|
|
|
|
|
|
|
AR = ar
|
|
|
|
ARFLAGS = rus
|
|
|
|
RANLIB = ranlib
|
|
|
|
|
|
|
|
TARGETS = verse.lib verse.exe
|
|
|
|
|
|
|
|
# Automatically generated protocol things.
|
|
|
|
PROT_DEF = v_cmd_def_a.c v_cmd_def_b.c v_cmd_def_c.c v_cmd_def_g.c v_cmd_def_m.c v_cmd_def_o.c v_cmd_def_s.c v_cmd_def_t.c
|
|
|
|
PROT_TOOL = v_cmd_gen.c $(PROT_DEF)
|
|
|
|
PROT_OUT = v_gen_pack_init.c v_gen_unpack_func.h verse.h \
|
|
|
|
v_gen_pack_a_node.c v_gen_pack_b_node.c v_gen_pack_c_node.c v_gen_pack_g_node.c v_gen_pack_m_node.c v_gen_pack_o_node.c v_gen_pack_s_node.c v_gen_pack_t_node.c
|
|
|
|
|
|
|
|
# The API implementation is the protocol code plus a few bits.
|
|
|
|
LIBVERSE_SRC = v_gen_pack_init.c v_gen_unpack_func.h verse.h v_gen_pack_a_node.c v_gen_pack_b_node.c v_gen_pack_c_node.c v_gen_pack_g_node.c \
|
|
|
|
v_gen_pack_m_node.c v_gen_pack_o_node.c v_gen_pack_s_node.c v_gen_pack_t_node.c \
|
|
|
|
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 = v_gen_pack_init.obj v_gen_pack_a_node.obj v_gen_pack_b_node.obj v_gen_pack_c_node.obj v_gen_pack_g_node.obj \
|
|
|
|
v_gen_pack_m_node.obj v_gen_pack_o_node.obj v_gen_pack_s_node.obj v_gen_pack_t_node.obj \
|
|
|
|
v_bignum.obj v_cmd_buf.obj v_connect.obj \
|
|
|
|
v_connection.obj v_encryption.obj \
|
|
|
|
v_func_storage.obj v_man_pack_node.obj \
|
|
|
|
v_network.obj v_network_in_que.obj v_network_out_que.obj \
|
|
|
|
v_pack.obj v_pack_method.obj v_prime.obj v_randgen.obj v_util.obj
|
|
|
|
|
|
|
|
# The server is a simple 1:1 mapping, but in Windows nmake ... That doesn't help much. :/
|
2006-10-02 13:29:17 +00:00
|
|
|
VERSE_SRC = vs_connection.c vs_main.c vs_master.c vs_node_audio.c vs_node_bitmap.c vs_node_curve.c vs_node_geometry.c vs_node_head.c vs_node_material.c vs_node_object.c vs_node_particle.c vs_node_storage.c vs_node_text.c
|
|
|
|
VERSE_OBJ = vs_connection.obj vs_main.obj vs_master.obj vs_node_audio.obj vs_node_bitmap.obj vs_node_curve.obj vs_node_geometry.obj \
|
2006-08-20 16:09:03 +00:00
|
|
|
vs_node_head.obj vs_node_material.obj vs_node_object.obj vs_node_particle.obj vs_node_storage.obj vs_node_text.obj
|
|
|
|
|
|
|
|
# -----------------------------------------------------
|
|
|
|
|
|
|
|
ALL: verse.lib verse.exe
|
|
|
|
|
2006-08-22 11:10:31 +00:00
|
|
|
verse.exe: $(VERSE_OBJ) verse.lib resources\verse.res
|
|
|
|
cl /Fe$@ $** wsock32.lib
|
2006-08-20 16:09:03 +00:00
|
|
|
|
|
|
|
verse.lib: $(LIBVERSE_OBJ)
|
2006-08-22 11:10:31 +00:00
|
|
|
link /lib /nologo /out:$@ $**
|
2006-08-20 16:09:03 +00:00
|
|
|
|
|
|
|
# -----------------------------------------------------
|
|
|
|
|
|
|
|
# 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.exe
|
|
|
|
mkprot.exe
|
|
|
|
|
|
|
|
# Build the protocol maker, from the definitions themselves.
|
|
|
|
mkprot.exe: $(PROT_TOOL) verse_header.h
|
|
|
|
$(CC) /DV_GENERATE_FUNC_MODE /Fe$@ $(PROT_TOOL)
|
|
|
|
|
|
|
|
# Clean away all the generated parts of the protocol implementation.
|
|
|
|
cleanprot: clean
|
|
|
|
del mkprot $(PROT_OUT) mkprot.exe
|
|
|
|
|
|
|
|
# -----------------------------------------------------
|
|
|
|
|
|
|
|
clean:
|
|
|
|
del *.obj $(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
|