#
# 
#	Copyright (C) 2003 Hirohisa MORI joshua@nichibun.ac.jp
# 
#	This program is free software; you can redistribute it and/or
#	modify it under the terms of the GLOBALBASE General Public 
#	License as published by http://www.globalbase.org/
# 
#	This program is distributed in the hope that it will be useful,
#	but WITHOUT ANY WARRANTY; without even the implied warranty of
#	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
#	Usage::
#
#	mmake MACHINE=linux			for linux
#	mmake MACHINE=MacOSX		for MacOSX
#	mmake MACHINE=FreeBSD		for FreeBSD
#
#	mmake VER=-update		force to update version code
#	mmake VER=-on			to make version code and object
#
#	combination of MACHINE and VER is abailable
##
#	default machine is solaris
#	auto MACHINE detection is available for linux, MacOSX, solaris
#
##
#	Library Options::
#
#	mmake EXTLIBS=attached		to use the library in src/ext/
#	                           			(default)
#	mmake EXTLIBS=system		to use the system-wide library
#
#
##

@(eq,${UNAME},SunOS)	set MACHINE	solaris
@(eq,${UNAME},Linux)	set MACHINE	linux
@(eq,${UNAME},FreeBSD)	set MACHINE FreeBSD
@(eq,${UNAME},Darwin)	set MACHINE MacOSX
@(ndef,MACHINE)			set MACHINE	solaris
@(ndef,TOOLKIT)			set TOOLKIT	gtk
@(ndef,OPTIMIZE)		set OPTIMIZE	0
@(ndef,VER)		set VER		-off


@ set CC	gcc
@ set CPP	g++
@ set YY	yacc
@ set PC	p2c
@ set DEP	mdep
@ set VERSION	mversion
@ set CFLAGS_B	"-g -c -Wall -Wno-unknown-pragmas -Werror -O${OPTIMIZE}"
@ set CFLAGS	"${CFLAGS_B} \
		-D__EXTENSIONS__ \
		-DMETH_TC \
		-D_REENTRANT"
@ set CPPFLAGS	${CFLAGS}
@ set INCLUDES_GB	"-I${src_dir} \
		-I../../src/h \
		-I../../src/arch/unix/h \
		-I../../src/arch/unix/machine/${MACHINE} \
		-I../../src/ext/h"

@(eq,${EXTLIBS},system)		set INCLUDES_NT	"${INCLUDES_GB} `freetype-config --cflags`"
@(neq,${EXTLIBS},system)		set INCLUDES_NT	"${INCLUDES_GB} -I${MACHINE}/include `${MACHINE}/bin/freetype-config --cflags`"

@(eq,${TOOLKIT},gtk)		set INCLUDES	"${INCLUDES_NT} `pkg-config gtk+-2.0 --cflags`"
@(neq,${TOOLKIT},gtk)		set INCLUDES	${INCLUDES_NT}

@ 				set LFLAGS_GB	"-O${OPTIMIZE}"
@(eq,${EXTLIBS},system) 		set LFLAGS ${LFLAGS_GB}
@(neq,${EXTLIBS},system)		set LFLAGS	"-L${MACHINE}/lib ${LFLAGS_GB}"

@				set M_LIB	"-lm "
@				set T_LIB	"-lposix4 -lpthread "
@				set N_LIB	"-lsocket -lnsl ${T_LIB}"
@				set W_LIB	"-lX11 ${N_LIB}"
@				set Z_LIB	"-lz"
@				set TK_LIB	"`pkg-config gtk+-2.0 --libs`"
@(eq,${EXTLIBS},system) 	set FT_LIB	"`freetype-config --libs`"
@(neq,${EXTLIBS},system)	set FT_LIB	"`${MACHINE}/bin/freetype-config --libs`"

@ set MVER	machine.posix.${MACHINE}.lib.ver

@ set V_FLAGS	"${VER} \
		-current ../current.ver \
		-prefix .c .t .cp .cpp \
		-base ${MACHINE}/work/ ../../src/ \
		-except ../../src/version \
		-code ap_version AP.code \
		-log ../../../../cvs.log \
			gbs/env/src/ ../../src/"

# set VL_VER	-update
@ set VL_FLAGS	"${VER} \
		-current ../current.ver \
		-prefix .c .t .cp .cpp \
		-base ${MACHINE}/work/ ../../src/ \
		-except ../../src/version \
		-log ../../../../cvs.log \
			gbs/env/src/ ../../src/"

@ set LINKSKIP				off
@(eq,${VER},-update) set LINKSKIP	on


#
#	linux option
#

@(eq,${MACHINE},linux)	set CFLAGS	\
			"${CFLAGS_B} \
			-D__EXTENSIONS__ \
			-DMETH_TC \
			-D_REENTRANT"
@(eq,${MACHINE},linux)	set T_LIB	"-lpthread "
@(eq,${MACHINE},linux)	set N_LIB	"-lnsl ${T_LIB} "
@(eq,${MACHINE},linux)	set W_LIB "-L/usr/X11R6/lib -lX11 ${N_LIB} "

#
#	FreeBSD option
#

@(eq,${MACHINE},FreeBSD)	set INCLUDES	\
			"${INCLUDES_NT} \
			-I/usr/X11R6/include"
@(eq,${MACHINE},FreeBSD)	set CFLAGS	\
			"${CFLAGS_B} \
			-D__EXTENSIONS__ \
			-DMETH_TC \
			-D_THREAD_SAFE \
			-D_REENTRANT"
@(eq,${MACHINE},FreeBSD)	set T_LIB	"-pthread "
@(eq,${MACHINE},FreeBSD)	set N_LIB	"${T_LIB} "
@(eq,${MACHINE},FreeBSD)	set W_LIB "-L/usr/X11R6/lib -lX11 ${N_LIB} "

#
#	MacOS X option
#

@(eq,${TOOLKIT},gtk)		set INCLUDES	"${INCLUDES_NT} \
			-I/usr/X11R6/include \
			`pkg-config gtk+-2.0 --cflags`"
@(neq,${TOOLKIT},gtk)		set INCLUDES	"${INCLUDES_NT} \
			-I/usr/X11R6/include"
@(eq,${MACHINE},MacOSX)		set CFLAGS	\
			"${CFLAGS_B} \
			-D__EXTENSIONS__ \
			-DMETH_TC \
			-D_REENTRANT \
			-no-cpp-precomp \
			-O${OPTIMIZE}"
@(eq,${MACHINE},MacOSX)		set T_LIB	"-lpthread "
@(eq,${MACHINE},MacOSX)		set N_LIB	"${T_LIB} -framework CoreFoundation -framework IOKit"
@(eq,${MACHINE},MacOSX)		set W_LIB "-L/usr/X11R6/lib -lX11.6 ${N_LIB} "




@ set YFLAGS	-d

@ source	../../src
@ work		${MACHINE}/work

@ keep		CVS d

@ insert	viewlib
@ insert	vtester
@ insert	lib/locator
@ insert	test/gpstester

@ insert	arch/unix/std
@ insert	arch/unix/u_fileroot
@ insert	arch/unix/viewlib/std
@ insert	arch/unix/viewlib/${TOOLKIT}
@ insert	arch/unix/main
@ insert	arch/unix/machine/${MACHINE}
@ delete	arch/unix/gbfloader

@ insert	main

@ insert	r64
@ insert	utils

@ insert	ppm2r64
@ insert	ppm
@(eq,${TOOLKIT},gtk) insert	gbclient

@ insert	endian
@ insert	xl
@ insert	r64status

@ insert	longchar

@ insert	stream
@ insert	memory_debug

@ insert	gbs
@ insert	pdb/fa
@ insert	pdb/status
@ insert	pdb/svg2pp
@ insert	pdb/nig2svg
@ insert	pdb/netmapper
@ insert	pdb/favt
@ insert	pdb/makekyotodb
@ insert	pdb/associate
@ insert	pdb/kiban2svg
@ insert	pdb/gm2svg

@ insert	gbjmp
@ insert	image/jpeg
@ insert	image/zlib/grue.c
@ insert	image/gif
@ insert	version

@ insert	install

@ delete	arch/unix/viewlib/x11


@(eq,${TOOLKIT},gtk) insert	ext/gtk+2

# TEST insert


@ delete 	longchar/wct/copy_wct.c
@ delete 	longchar/wct/latin.c
@ delete 	longchar/wct/jp.c
@ delete 	longchar/wct/set_convert.c
@ delete 	longchar/wct/wct_check.c
@ delete 	longchar/wct/set_wct.c
@ delete 	longchar/wct/wct_conv.c
@ delete	longchar/wct/unicode.c
@ delete	longchar/window/lc2cfl.c

@ delete	longchar/gbf/gbf_open_disp.c
@ delete	longchar/gbfglue

@ delete	arch/unix/gbfloader/gc.c

@ delete	arch/unix/viewlib/std
# delete	arch/unix/viewlib/x11/v_loop.c
@ delete	viewlib/std/v_text.c



@(eq,${TOOLKIT},)	delete viewlib/std
@(eq,${TOOLKIT},)	delete viewlib/gb
@(eq,${TOOLKIT},)	delete viewlib/xl
@(eq,${TOOLKIT},)	delete arch/unix/viewlib/gtk
@(eq,${TOOLKIT},)	delete vtester


@(eq,${VER},-on) startpoint
@(eq,${VER},-update) startpoint

@ tree

@ make sufix .c from sufix - .y
	${YY} ${YFLAGS} ${from}
 	cp y.tab.c ${to}.c
 	rm y.tab.c

@ make file ${MACHINE}/lib/libz.a from sufix ../../src/ext/zlib .c
	touch ${MACHINE}/lib/libz.a
.(eq,${EXTLIBS},system) finish
	rm ${MACHINE}/lib/libz.a
	mkdir -p ${MACHINE}/work/ext/zlib
	cp -r ../../src/ext/zlib ${MACHINE}/work/ext/
	wd=`pwd` ; cd ${MACHINE}/work/ext/zlib ; CC=${CC} prefix=${wd}/${MACHINE} ./configure ; make install prefix=${wd}/${MACHINE} libdir=${wd}/${MACHINE}/lib includedir=${wd}/${MACHINE}/include

@ make file ${MACHINE}/bin/freetype-config from file ../../src/ext/freetype2 Makefile
	touch ${MACHINE}/bin/freetype-config
.(eq,${EXTLIBS},system) finish
	rm ${MACHINE}/bin/freetype-config
	mkdir -p ${MACHINE}/work/ext/freetype2
	cp -r ../../src/ext/freetype2 ${MACHINE}/work/ext/
.(eq,${MACHINE},FreeBSD) set GNUMAKE gmake
.(ndef,GNUMAKE) set GNUMAKE make
	wd=`pwd` ; cd ${MACHINE}/work/ext/freetype2 ; GNUMAKE=${GNUMAKE} CC=${CC} LDFLAGS=-L${wd}/${MACHINE}/lib CFLAGS=-I${wd}/${MACHINE}/include ./configure --prefix=${wd}/${MACHINE} --disable-shared ; ${GNUMAKE} install

@ make sufix .o from sufix - .c
	${DEP} ${INCLUDES} -i${from} -o${to}.c.ap
	${CC} ${CFLAGS} ${INCLUDES} -o ${to}.o ${from}

@ make sufix .o from sufix - .cp
	${DEP} ${INCLUDES} -i${from} -o${to}.cp.ap
	${CPP} ${CPPFLAGS} ${INCLUDES} -o ${to}.o ${from}

@ make sufix .o from sufix - .cpp
	${DEP} ${INCLUDES} -i${from} -o${to}.cpp.ap
	${CPP} ${CPPFLAGS} ${INCLUDES} -o ${to}.o ${from}

@ make sufix .o from sufix - .t
	${PC} ${from} ${to}.c
	${DEP} ${INCLUDES} -i${from} -o${to}.c.ap
	${CC} ${CFLAGS} ${INCLUDES} -o ${to}.o ${to}.c


@ make file ${MACHINE}/bin/gbmp from \
	sufix ${MACHINE}/work/gbs/lib/lump .o \
	sufix ${MACHINE}/work/gbs/mp .o \
	sufix ${MACHINE}/work/longchar/std .o \
	sufix ${MACHINE}/work/longchar/wct0 .o \
	sufix ${MACHINE}/work/stream .o \
	sufix ${MACHINE}/work/arch/unix/std .o \
	sufix ${MACHINE}/work/utils .o \
	sufix ${MACHINE}/work/xl/lib .o \
	sufix ${MACHINE}/work/xl/function .o \
	file ${MACHINE}/work/memory_debug \
			memory_debug.o \
	sufix ${MACHINE}/work/endian .o \
	sufix ${MACHINE}/work/gbs/lib/mp .o \
	sufix ${MACHINE}/work/xl/server_function .o \
	sufix ${MACHINE}/work/gbs/lib/version .o \
	sufix ${MACHINE}/work/arch/unix/main/stab .o \
	sufix ${MACHINE}/work/arch/unix/machine/${MACHINE} .o \
\
	file ${MACHINE}/work/version xl.o gb.o \
	file ${MACHINE}/work/version \
			landscape.posix.${MACHINE}.${to_leaf}.ver.o \
	file ${MACHINE}/work/version ${MVER}.o \
	file ${MACHINE}/work/version source.ver.o \
	file ${MACHINE}/work/version gb.lib.ver.o \
	file ${MACHINE}/work/version xl.lib.ver.o

.set	VTAR	version/landscape.posix.${MACHINE}.${to_leaf}.ver

.(neq,${VER},-off) do \
	${VERSION} ${V_FLAGS} \
		-app ${to} \
		-object ${from} \
		-work ../${VTAR} \
		-c ../../src/${VTAR}.c \
		-msg GLOBALBASE Management Processor Agent

.(nexist,${MACHINE}/work/${VTAR}.o)		finish
.(nexist,${MACHINE}/work/version/${MVER}.o)	finish
.(nexist,${MACHINE}/work/version/xl.lib.ver.o)	finish
.(nexist,${MACHINE}/work/version/source.ver.o)	finish
.(nexist,${MACHINE}/work/version/gb.lib.ver.o)	finish
.(eq,${LINKSKIP},on)				finish

	${CC} -o ${to} ${LFLAGS} ${from} ${M_LIB} ${N_LIB}

# stop


@ make file ${MACHINE}/bin/gbview from \
	sufix ${MACHINE}/work/gbs/lib/lump .o \
	sufix ${MACHINE}/work/gbs/lib/resource .o \
	sufix ${MACHINE}/work/utils .o \
	sufix ${MACHINE}/work/gbs/view .o \
	sufix ${MACHINE}/work/r64 .o \
	sufix ${MACHINE}/work/arch/unix/std .o \
	sufix ${MACHINE}/work/gbs/lib/maputils .o \
	sufix ${MACHINE}/work/endian .o \
	sufix ${MACHINE}/work/http .o \
	sufix ${MACHINE}/work/longchar/std .o \
	sufix ${MACHINE}/work/longchar/window .o \
	sufix ${MACHINE}/work/longchar/html .o \
	sufix ${MACHINE}/work/longchar/wct .o \
	sufix ${MACHINE}/work/longchar/gbf .o \
	sufix ${MACHINE}/work/longchar/function .o \
	sufix ${MACHINE}/work/longchar/gbfglue .o \
	sufix ${MACHINE}/work/longchar/ft2engine .o \
	sufix ${MACHINE}/work/stream .o \
	file ${MACHINE}/work/memory_debug \
				memory_debug.o \
	sufix ${MACHINE}/work/xl/lib .o \
	sufix ${MACHINE}/work/xl/function .o \
	sufix ${MACHINE}/work/gbs/lib/trailer .o \
	sufix ${MACHINE}/work/gbs/lib/version .o \
	sufix ${MACHINE}/work/image .o \
	sufix ${MACHINE}/work/arch/unix/main/window .o \
	sufix ${MACHINE}/work/arch/unix/machine/${MACHINE} .o \
	sufix ${MACHINE}/work/gbs/lib/view .o \
	sufix ${MACHINE}/work/gbs/lib/viewutils .o \
	sufix ${MACHINE}/work/gbs/lib/rcache .o \
	sufix ${MACHINE}/work/pdb/favt .o \
	sufix ${MACHINE}/work/pdb/fa .o \
\
	file ${MACHINE}/work/version xl.o gb.o \
	file ${MACHINE}/work/version \
			landscape.posix.${MACHINE}.${to_leaf}.ver.o \
	file ${MACHINE}/work/version ${MVER}.o \
	file ${MACHINE}/work/version source.ver.o \
	file ${MACHINE}/work/version gb.lib.ver.o \
	file ${MACHINE}/work/version xl.lib.ver.o

.set	VTAR	version/landscape.posix.${MACHINE}.${to_leaf}.ver

.(neq,${VER},-off) do \
	${VERSION} ${V_FLAGS} \
		-app ${to} \
		-object ${from} \
		-work ../${VTAR} \
		-c ../../src/${VTAR}.c \
		-msg GLOBALBASE view angent

.(nexist,${MACHINE}/work/${VTAR}.o)		finish
.(nexist,${MACHINE}/work/version/${MVER}.o)	finish
.(nexist,${MACHINE}/work/version/xl.lib.ver.o)	finish
.(nexist,${MACHINE}/work/version/source.ver.o)	finish
.(nexist,${MACHINE}/work/version/gb.lib.ver.o)	finish
.(eq,${LINKSKIP},on)				finish


	${CC} -o ${to} ${LFLAGS} ${from} ${M_LIB} ${FT_LIB} ${Z_LIB} ${N_LIB}

# stop

@ make file ${MACHINE}/bin/xl from \
	sufix ${MACHINE}/work/xl/sh .o \
	sufix ${MACHINE}/work/longchar/std .o \
	sufix ${MACHINE}/work/longchar/wct0 .o \
	sufix ${MACHINE}/work/stream .o \
	sufix ${MACHINE}/work/arch/unix/std .o \
	sufix ${MACHINE}/work/utils .o \
	sufix ${MACHINE}/work/xl/lib .o \
	sufix ${MACHINE}/work/xl/function .o \
	file ${MACHINE}/work/memory_debug \
			memory_debug.o \
	sufix ${MACHINE}/work/endian .o \
	sufix ${MACHINE}/work/arch/unix/main/cmdline .o \
	sufix ${MACHINE}/work/arch/unix/machine/${MACHINE} .o \
\
	file ${MACHINE}/work/version xl.o \
	file ${MACHINE}/work/version \
			landscape.posix.${MACHINE}.${to_leaf}.ver.o \
	file ${MACHINE}/work/version ${MVER}.o \
	file ${MACHINE}/work/version source.ver.o \
	file ${MACHINE}/work/version xl.lib.ver.o

.set	VTAR	version/landscape.posix.${MACHINE}.${to_leaf}.ver

.(neq,${VER},-off) do \
	${VERSION} ${V_FLAGS} \
		-app ${to} \
		-object ${from} \
		-work ../${VTAR} \
		-c ../../src/${VTAR}.c \
		-msg XL interpreter

.(nexist,${MACHINE}/work/${VTAR}.o)		finish
.(nexist,${MACHINE}/work/version/${MVER}.o)	finish
.(nexist,${MACHINE}/work/version/xl.lib.ver.o)	finish
.(nexist,${MACHINE}/work/version/source.ver.o)	finish
.(eq,${LINKSKIP},on)				finish

	${CC} -o ${to} ${LFLAGS} ${from} ${M_LIB} ${N_LIB}

# stop

@ make file ${MACHINE}/bin/xlufr from \
	file ${MACHINE}/work/arch/unix/std/panic \
			er_panic.o \
	file ${MACHINE}/work/arch/unix/std/utils \
			u_file.o \
	sufix ${MACHINE}/work/arch/unix/u_fileroot .o \
\
	file ${MACHINE}/work/version xl.o gb.o \
	file ${MACHINE}/work/version \
			landscape.posix.${MACHINE}.${to_leaf}.ver.o \
	file ${MACHINE}/work/version ${MVER}.o \
	file ${MACHINE}/work/version source.ver.o \
	file ${MACHINE}/work/version gb.lib.ver.o \
	file ${MACHINE}/work/version xl.lib.ver.o

.set	VTAR	version/landscape.posix.${MACHINE}.${to_leaf}.ver

.(neq,${VER},-off) do \
	${VERSION} ${V_FLAGS} \
		-app ${to} \
		-object ${from} \
		-work ../${VTAR} \
		-c ../../src/${VTAR}.c \
		-msg GLOBALBASE File Access Grue

.(nexist,${MACHINE}/work/${VTAR}.o)		finish
.(nexist,${MACHINE}/work/version/${MVER}.o)	finish
.(nexist,${MACHINE}/work/version/xl.lib.ver.o)	finish
.(nexist,${MACHINE}/work/version/source.ver.o)	finish
.(nexist,${MACHINE}/work/version/gb.lib.ver.o)	finish
.(eq,${LINKSKIP},on)				finish

	${CC} -o ${to} ${LFLAGS} ${from} ${M_LIB} ${N_LIB}

# stop


@ make file ${MACHINE}/bin/gbstd from \
	sufix ${MACHINE}/work/gbs/std .o \
	sufix ${MACHINE}/work/longchar/std .o \
	sufix ${MACHINE}/work/longchar/wct0 .o \
	sufix ${MACHINE}/work/stream .o \
	sufix ${MACHINE}/work/arch/unix/std .o \
	sufix ${MACHINE}/work/utils .o \
	sufix ${MACHINE}/work/xl/lib .o \
	sufix ${MACHINE}/work/xl/function .o \
	file ${MACHINE}/work/memory_debug \
			memory_debug.o \
	sufix ${MACHINE}/work/endian .o \
	sufix ${MACHINE}/work/gbs/lib/mp .o \
	sufix ${MACHINE}/work/arch/unix/main/cmdline .o \
	sufix ${MACHINE}/work/arch/unix/machine/${MACHINE} .o \
	sufix ${MACHINE}/work/gbs/lib/version .o \
	sufix ${MACHINE}/work/gbs/lib/resource .o \
	sufix ${MACHINE}/work/gbs/lib/maputils .o \
	sufix ${MACHINE}/work/gbs/lib/rcache .o \
	file ${MACHINE}/work/gbs/lib/view style.o \
	sufix ${MACHINE}/work/pdb/favt .o \
	sufix ${MACHINE}/work/pdb/fa .o \
\
	file ${MACHINE}/work/version xl.o gb.o \
	file ${MACHINE}/work/version \
			landscape.posix.${MACHINE}.${to_leaf}.ver.o \
	file ${MACHINE}/work/version ${MVER}.o \
	file ${MACHINE}/work/version source.ver.o \
	file ${MACHINE}/work/version gb.lib.ver.o \
	file ${MACHINE}/work/version xl.lib.ver.o

.set	VTAR	version/landscape.posix.${MACHINE}.${to_leaf}.ver

.(neq,${VER},-off) do \
	${VERSION} ${V_FLAGS} \
		-app ${to} \
		-object ${from} \
		-work ../${VTAR} \
		-c ../../src/${VTAR}.c \
		-msg GLOBALBASE standard agent

.(nexist,${MACHINE}/work/${VTAR}.o)		finish
.(nexist,${MACHINE}/work/version/${MVER}.o)	finish
.(nexist,${MACHINE}/work/version/xl.lib.ver.o)	finish
.(nexist,${MACHINE}/work/version/source.ver.o)	finish
.(nexist,${MACHINE}/work/version/gb.lib.ver.o)	finish
.(eq,${LINKSKIP},on)				finish

	${CC} -o ${to} ${LFLAGS} ${from} ${M_LIB} ${N_LIB}




# stop

@ make file ${MACHINE}/bin/xlsv from \
	sufix ${MACHINE}/work/longchar/std .o \
	sufix ${MACHINE}/work/longchar/wct0 .o \
	sufix ${MACHINE}/work/stream .o \
	sufix ${MACHINE}/work/arch/unix/std .o \
	sufix ${MACHINE}/work/utils .o \
	sufix ${MACHINE}/work/xl/lib .o \
	sufix ${MACHINE}/work/xl/function .o \
	sufix ${MACHINE}/work/xl/server_function .o \
	sufix ${MACHINE}/work/xl/server .o \
	file ${MACHINE}/work/memory_debug \
			memory_debug.o \
	sufix ${MACHINE}/work/endian .o \
	sufix ${MACHINE}/work/arch/unix/main/stab .o \
	sufix ${MACHINE}/work/arch/unix/machine/${MACHINE} .o \
\
	file ${MACHINE}/work/version xl.o \
	file ${MACHINE}/work/version \
		landscape.posix.${MACHINE}.${to_leaf}.ver.o \
	file ${MACHINE}/work/version ${MVER}.o \
	file ${MACHINE}/work/version source.ver.o \
	file ${MACHINE}/work/version xl.lib.ver.o

.set	VTAR	version/landscape.posix.${MACHINE}.${to_leaf}.ver

.(neq,${VER},-off) do \
	${VERSION} ${V_FLAGS} \
		-app ${to} \
		-object ${from} \
		-work ../${VTAR} \
		-c ../../src/${VTAR}.c \
		-msg XL server agent

.(nexist,${MACHINE}/work/${VTAR}.o)		finish
.(nexist,${MACHINE}/work/version/${MVER}.o)	finish
.(nexist,${MACHINE}/work/version/xl.lib.ver.o)	finish
.(nexist,${MACHINE}/work/version/source.ver.o)	finish
.(eq,${LINKSKIP},on)				finish

	${CC} -o ${to} ${LFLAGS} ${from} ${M_LIB} ${N_LIB}

# stop

@ make file ${MACHINE}/bin/gbpmd from \
	sufix ${MACHINE}/work/gbs/lib/pfc .o \
	sufix ${MACHINE}/work/gbs/lib/pmd .o \
	sufix ${MACHINE}/work/gbs/lib/lump .o \
	sufix ${MACHINE}/work/gbs/lib/resource .o \
	sufix ${MACHINE}/work/gbs/pmd .o \
	sufix ${MACHINE}/work/utils .o \
	sufix ${MACHINE}/work/endian .o \
	sufix ${MACHINE}/work/longchar/std .o \
	sufix ${MACHINE}/work/longchar/wct0 .o \
	sufix ${MACHINE}/work/stream .o \
	sufix ${MACHINE}/work/arch/unix/std .o \
	file ${MACHINE}/work/memory_debug \
			memory_debug.o \
	sufix ${MACHINE}/work/xl/lib .o \
	sufix ${MACHINE}/work/xl/function .o \
	sufix ${MACHINE}/work/gbs/lib/maputils .o \
	sufix ${MACHINE}/work/pdb/favt .o \
	sufix ${MACHINE}/work/pdb/fa .o \
	sufix ${MACHINE}/work/gbs/lib/version .o \
	sufix ${MACHINE}/work/arch/unix/main/cmdline .o \
	sufix ${MACHINE}/work/arch/unix/machine/${MACHINE} .o \
	file  ${MACHINE}/work/gbs/lib/view style.o \
	sufix ${MACHINE}/work/gbs/lib/rcache .o \
\
	file ${MACHINE}/work/version xl.o gb.o \
	file ${MACHINE}/work/version \
			landscape.posix.${MACHINE}.${to_leaf}.ver.o \
	file ${MACHINE}/work/version ${MVER}.o \
	file ${MACHINE}/work/version source.ver.o \
	file ${MACHINE}/work/version gb.lib.ver.o \
	file ${MACHINE}/work/version xl.lib.ver.o

.set	VTAR	version/landscape.posix.${MACHINE}.${to_leaf}.ver

.(neq,${VER},-off) do \
	${VERSION} ${V_FLAGS} \
		-app ${to} \
		-object ${from} \
		-work ../${VTAR} \
		-c ../../src/${VTAR}.c \
		-msg GLOBALBASE Plate Metadata DB agent

.(nexist,${MACHINE}/work/${VTAR}.o)		finish
.(nexist,${MACHINE}/work/version/${MVER}.o)	finish
.(nexist,${MACHINE}/work/version/xl.lib.ver.o)	finish
.(nexist,${MACHINE}/work/version/source.ver.o)	finish
.(nexist,${MACHINE}/work/version/gb.lib.ver.o)	finish
.(eq,${LINKSKIP},on)				finish

	${CC} -o ${to}  ${LFLAGS} ${from} ${M_LIB} ${N_LIB}

# stop





@ make file ${MACHINE}/bin/gpstester from \
	sufix ${MACHINE}/work/test/gpstester .o \
	sufix ${MACHINE}/work/lib/locator .o \
	sufix ${MACHINE}/work/endian .o \
	sufix ${MACHINE}/work/longchar/std .o \
	sufix ${MACHINE}/work/longchar/wct0 .o \
	sufix ${MACHINE}/work/arch/unix/std/stream .o \
	file ${MACHINE}/work/stream \
			s_buf.o \
			s_close.o \
			s_copy_to_stream.o \
			s_descripter.o \
			s_error.o \
			s_exist.o \
			s_flush.o \
			s_get_cm.o \
			s_get_socketip.o \
			s_get_thput.o \
			s_init.o \
			s_open.o \
			s_printf.o \
			s_push.o \
			s_read.o \
			s_reset_cr.o \
			s_set_cm.o \
			s_set_cr.o \
			s_string.o \
			s_write.o \
	sufix ${MACHINE}/work/arch/unix/main/cmdline .o \
	sufix ${MACHINE}/work/arch/unix/std/panic .o \
	sufix ${MACHINE}/work/arch/unix/std/thread .o \
	sufix ${MACHINE}/work/arch/unix/std/net .o \
	file ${MACHINE}/work/arch/unix/std/utils \
			get_default_cm.o \
			change_delim.o \
			get_fd_max.o \
			numofcpu.o \
			get_xltime.o \
			get_home.o \
			msequence.o \
			which.o \
			get_mem_size.o \
			u_file.o \
			u_fileroot.o \
			u_stat.o \
	sufix ${MACHINE}/work/arch/unix/machine/${MACHINE} .o \
	file ${MACHINE}/work/utils \
			init_utils.o \
			u_mkdir.o \
			tick.o \
			thread_area.o \
			set_buffer.o \
			ll_copy_str.o \
			blacklist.o \
			set_sys_param.o \
			ln_copy_str.o \
			resolve.o \
			getHA.o \
			u_log.o \
	sufix ${MACHINE}/work/utils/copy .o \
	sufix ${MACHINE}/work/utils/avt .o \
	file ${MACHINE}/work/memory_debug x_memory_debug.o

.set	VTAR	version/gpstester.posix.${MACHINE}.ver

.(neq,${VER},-off) do \
	${VERSION} ${V_FLAGS} \
		-app ${to} \
		-object ${from} \
		-work ../${VTAR} \
		-c ../../src/${VTAR}.c \
		-msg gps I/O tester

	${CPP} -o ${to} ${LFLAGS} ${from} ${M_LIB} ${W_LIB}

@ make file ${MACHINE}/bin/lcconv from \
	sufix ${MACHINE}/work/longchar/lcconv .o \
	sufix ${MACHINE}/work/arch/unix/std/panic .o \
	sufix ${MACHINE}/work/utils/avt .o \
	file ${MACHINE}/work/longchar/std \
			code_table.o \
			l_strcmp.o \
			l_strlen.o \
			get_mask.o \
	sufix ${MACHINE}/work/longchar/wct0 .o \
	file ${MACHINE}/work/utils \
			ll_copy_str.o \
			u_log.o \
	file ${MACHINE}/work/memory_debug x_memory_debug.o dummy.o

.set	VTAR	version/landscape.posix.${MACHINE}.${to_leaf}.ver

.(neq,${VER},-off) do \
	${VERSION} ${V_FLAGS} \
		-app ${to} \
		-object ${from} \
		-work ../${VTAR} \
		-c ../../src/${VTAR}.c \
		-msg long char converter

	${CC} -o ${to} ${LFLAGS} ${from}

# stop

#@ make file ${MACHINE}/bin/gbfloader from \
#	sufix ${MACHINE}/work/arch/unix/gbfloader .o \
#	sufix ${MACHINE}/work/longchar/gbf .o \
#	sufix ${MACHINE}/work/longchar/std .o \
#	sufix ${MACHINE}/work/longchar/wct .o \
#	file ${MACHINE}/work/longchar/window \
#			get_string_pic.o \
#	sufix ${MACHINE}/work/arch/unix/viewlib/x11 .o \
#	sufix ${MACHINE}/work/arch/unix/std/thread .o \
#	sufix ${MACHINE}/work/endian .o \
#	file ${MACHINE}/work/memory_debug \
#			memory_debug.o \
#	sufix ${MACHINE}/work/utils/copy .o \
#	sufix ${MACHINE}/work/arch/unix/std/panic .o \
#	file ${MACHINE}/work/arch/unix/machine/${MACHINE} \
#			thread.o \
#			sleep_wakeup.o \
#			block.o \
#			super_schedule.o \
#			get_fd_max.o \
#			numofcpu.o \
#			get_mem_size.o \
#	file ${MACHINE}/work/arch/unix/std/utils \
#			get_default_cm.o \
#			msequence.o \
#			get_locale.o \
#			get_xltime.o \
#			change_delim.o \
#			get_fd_max.o \
#			numofcpu.o \
#			get_mem_size.o \
#			u_file.o \
#			u_fileroot.o \
#			u_stat.o \
#	file ${MACHINE}/work/utils \
#			init_utils.o \
#			u_mkdir.o \
#			tick.o \
#			thread_area.o \
#			set_buffer.o \
#			ll_copy_str.o \
#			blacklist.o \
#			set_sys_param.o \
#			ln_copy_str.o \
#			u_log.o \
#	sufix ${MACHINE}/work/utils/avt .o \
#\
#	file ${MACHINE}/work/version xl.o gb.o \
#	file ${MACHINE}/work/version \
#		landscape.posix.${MACHINE}.${to_leaf}.ver.o \
#	file ${MACHINE}/work/version ${MVER}.o \
#	file ${MACHINE}/work/version source.ver.o \
#	file ${MACHINE}/work/version xl.lib.ver.o \
#	file ${MACHINE}/work/version gb.lib.ver.o
#
#.set	VTAR	version/landscape.posix.${MACHINE}.${to_leaf}.ver
#
#.(neq,${VER},-off) do \
#	${VERSION} ${V_FLAGS} \
#		-app ${to} \
#		-object ${from} \
#		-work ../${VTAR} \
#		-c ../../src/${VTAR}.c \
#		-msg gb font loader
#
#.(nexist,${MACHINE}/work/${VTAR}.o)		finish
#.(nexist,${MACHINE}/work/version/${MVER}.o)	finish
#.(nexist,${MACHINE}/work/version/xl.lib.ver.o)	finish
#.(nexist,${MACHINE}/work/version/source.ver.o)	finish
#.(nexist,${MACHINE}/work/version/gb.lib.ver.o)	finish
#.(eq,${LINKSKIP},on)				finish
#
#	${CC} -o ${to} ${LFLAGS} ${from} ${W_LIB}
#
# stop

@ make file ${MACHINE}/bin/ft2index from \
	file ${MACHINE}/work/longchar/ft2index ft2index.o \

	${CC} -o ${to} ${LFLAGS} ${from} ${FT_LIB} ${M_LIB}


@ make file ${MACHINE}/bin/replace from \
	file ${MACHINE}/work/install/replace main.o \

	${CC} -o ${to} ${LFLAGS} ${from} ${M_LIB}




@ make file ${MACHINE}/bin/kiban2svg from \
	sufix ${MACHINE}/work/pdb/kiban2svg .o \
\
	file ${MACHINE}/work/version ${MVER}.o \
	file ${MACHINE}/work/version source.ver.o

.set	VTAR	version/landscape.posix.${MACHINE}.${to_leaf}.ver

.(neq,${VER},-off) do \
	${VERSION} ${V_FLAGS} \
		-app ${to} \
		-object ${from} \
		-work ../${VTAR} \
		-c ../../src/${VTAR}.c \
		-msg Kokudo Chiri-in Kiban Data to svg converter

.(nexist,${MACHINE}/work/${VTAR}.o)		finish
.(nexist,${MACHINE}/work/version/source.ver.o)	finish
.(eq,${LINKSKIP},on)				finish

	${CC} -o ${to} ${LFLAGS} ${from} ${M_LIB}

@ make file ${MACHINE}/bin/gm2svg from \
	sufix ${MACHINE}/work/pdb/gm2svg .o \
\
	file ${MACHINE}/work/version ${MVER}.o \
	file ${MACHINE}/work/version source.ver.o

.set	VTAR	version/landscape.posix.${MACHINE}.${to_leaf}.ver

.(neq,${VER},-off) do \
	${VERSION} ${V_FLAGS} \
		-app ${to} \
		-object ${from} \
		-work ../${VTAR} \
		-c ../../src/${VTAR}.c \
		-msg GlobalMap to svg converter

.(nexist,${MACHINE}/work/${VTAR}.o)		finish
.(nexist,${MACHINE}/work/version/source.ver.o)	finish
.(eq,${LINKSKIP},on)				finish

	${CC} -o ${to} ${LFLAGS} ${from} ${M_LIB}


@ make file ${MACHINE}/bin/gbjmp.cgi from \
	sufix ${MACHINE}/work/gbjmp .o \
\
	file ${MACHINE}/work/version ${MVER}.o \
	file ${MACHINE}/work/version source.ver.o

.set	VTAR	version/landscape.posix.${MACHINE}.${to_leaf}.ver

.(neq,${VER},-off) do \
	${VERSION} ${V_FLAGS} \
		-app ${to} \
		-object ${from} \
		-work ../${VTAR} \
		-c ../../src/${VTAR}.c \
		-msg GLOBALBASE jmp cgi

.(nexist,${MACHINE}/work/${VTAR}.o)		finish
.(nexist,${MACHINE}/work/version/source.ver.o)	finish
.(eq,${LINKSKIP},on)				finish

	${CC} -o ${to} ${LFLAGS} ${from}


@ make file ${MACHINE}/bin/exl from \
	sufix ${MACHINE}/work/xl/exsh .o \
	sufix ${MACHINE}/work/xl/ex_function .o \
	sufix ${MACHINE}/work/longchar/std .o \
	sufix ${MACHINE}/work/longchar/wct .o \
	sufix ${MACHINE}/work/stream .o \
	sufix ${MACHINE}/work/arch/unix/std .o \
	sufix ${MACHINE}/work/utils .o \
	sufix ${MACHINE}/work/xl/lib .o \
	sufix ${MACHINE}/work/xl/function .o \
	file ${MACHINE}/work/memory_debug \
			memory_debug.o \
	sufix ${MACHINE}/work/endian .o \
	sufix ${MACHINE}/work/pdb/associate .o \
	sufix ${MACHINE}/work/pdb/favt .o \
	sufix ${MACHINE}/work/pdb/fa .o \
	sufix ${MACHINE}/work/gbs/lib/maputils .o \
	sufix ${MACHINE}/work/arch/unix/main/cmdline .o \
	sufix ${MACHINE}/work/arch/unix/machine/${MACHINE} .o \
\
	file ${MACHINE}/work/version xl.o \
	file ${MACHINE}/work/version \
			landscape.posix.${MACHINE}.${to_leaf}.ver.o \
	file ${MACHINE}/work/version ${MVER}.o \
	file ${MACHINE}/work/version source.ver.o \
	file ${MACHINE}/work/version xl.lib.ver.o

.set	VTAR	version/landscape.posix.${MACHINE}.${to_leaf}.ver

.(neq,${VER},-off) do \
	${VERSION} ${V_FLAGS} \
		-app ${to} \
		-object ${from} \
		-work ../${VTAR} \
		-c ../../src/${VTAR}.c \
		-msg Extended XL interpreter

.(nexist,${MACHINE}/work/${VTAR}.o)		finish
.(nexist,${MACHINE}/work/version/${MVER}.o)	finish
.(nexist,${MACHINE}/work/version/xl.lib.ver.o)	finish
.(nexist,${MACHINE}/work/version/source.ver.o)	finish
.(eq,${LINKSKIP},on)				finish

	${CC} -o ${to} ${LFLAGS} ${from} ${M_LIB} ${N_LIB}

# stop



@ make file ${MACHINE}/bin/netmapper from \
	sufix ${MACHINE}/work/pdb/netmapper .o \
	sufix ${MACHINE}/work/longchar/std .o \
	sufix ${MACHINE}/work/longchar/wct .o \
	sufix ${MACHINE}/work/stream .o \
	sufix ${MACHINE}/work/arch/unix/std .o \
	sufix ${MACHINE}/work/utils .o \
	sufix ${MACHINE}/work/xl/lib .o \
	sufix ${MACHINE}/work/xl/function .o \
	sufix ${MACHINE}/work/xl/ex_function .o \
	file ${MACHINE}/work/memory_debug \
			memory_debug.o \
	sufix ${MACHINE}/work/endian .o \
	sufix ${MACHINE}/work/gbs/lib/maputils .o \
	sufix ${MACHINE}/work/arch/unix/main/cmdline .o \
	sufix ${MACHINE}/work/arch/unix/machine/${MACHINE} .o \
	sufix ${MACHINE}/work/pdb/associate .o \
	sufix ${MACHINE}/work/pdb/favt .o \
	sufix ${MACHINE}/work/pdb/fa .o \
	sufix ${MACHINE}/work/ppm .o \
\
	file ${MACHINE}/work/version xl.o \
	file ${MACHINE}/work/version \
			landscape.posix.${MACHINE}.${to_leaf}.ver.o \
	file ${MACHINE}/work/version ${MVER}.o \
	file ${MACHINE}/work/version source.ver.o \
	file ${MACHINE}/work/version xl.lib.ver.o

.set	VTAR	version/landscape.posix.${MACHINE}.${to_leaf}.ver

.(neq,${VER},-off) do \
	${VERSION} ${V_FLAGS} \
		-app ${to} \
		-object ${from} \
		-work ../${VTAR} \
		-c ../../src/${VTAR}.c \
		-msg Mapping path Net mapper

.(nexist,${MACHINE}/work/${VTAR}.o)		finish
.(nexist,${MACHINE}/work/version/${MVER}.o)	finish
.(nexist,${MACHINE}/work/version/xl.lib.ver.o)	finish
.(nexist,${MACHINE}/work/version/source.ver.o)	finish
.(eq,${LINKSKIP},on)				finish

	${CC} -o ${to} ${LFLAGS} ${from} ${M_LIB} ${N_LIB}

# stop


@ make file ${MACHINE}/bin/ppm2r64 from \
	sufix ${MACHINE}/work/r64 .o \
	sufix ${MACHINE}/work/ppm2r64 .o \
	sufix ${MACHINE}/work/ppm .o \
	sufix ${MACHINE}/work/endian .o \
	sufix ${MACHINE}/work/arch/unix/panic .o \
	sufix ${MACHINE}/work/image/jpeg .o \
	sufix ${MACHINE}/work/arch/unix/std/panic .o \
	file ${MACHINE}/work/memory_debug \
			x_memory_debug.o \
			dummy.o \
	file ${MACHINE}/work/arch/unix/std/utils \
			u_file.o \
	file ${MACHINE}/work/utils \
			u_log.o \
	sufix ${MACHINE}/work/utils/avt .o \
\
	file ${MACHINE}/work/version \
			landscape.posix.${MACHINE}.${to_leaf}.ver.o \
	file ${MACHINE}/work/version ${MVER}.o \
	file ${MACHINE}/work/version source.ver.o

.set	VTAR	version/landscape.posix.${MACHINE}.${to_leaf}.ver

.(neq,${VER},-off) do \
	${VERSION} ${V_FLAGS} \
		-app ${to} \
		-object ${from} \
		-work ../${VTAR} \
		-c ../../src/${VTAR}.c \
		-msg ppm to r64/cr format converter

.(nexist,${MACHINE}/work/${VTAR}.o)		finish
.(nexist,${MACHINE}/work/version/${MVER}.o)	finish
.(nexist,${MACHINE}/work/version/source.ver.o)	finish
.(eq,${LINKSKIP},on)				finish

	${CC} -o ${to} ${from} ${M_LIB}

# stop





@ make file ${MACHINE}/bin/gbpdbp from \
	sufix ${MACHINE}/work/gbs/pdbp .o \
	sufix ${MACHINE}/work/pdb/fa .o \
	sufix ${MACHINE}/work/longchar/std .o \
	sufix ${MACHINE}/work/longchar/wct0 .o \
	sufix ${MACHINE}/work/stream .o \
	sufix ${MACHINE}/work/arch/unix/std .o \
	sufix ${MACHINE}/work/utils .o \
	sufix ${MACHINE}/work/xl/lib .o \
	sufix ${MACHINE}/work/xl/function .o \
	file ${MACHINE}/work/memory_debug \
			memory_debug.o \
	sufix ${MACHINE}/work/endian .o \
	sufix ${MACHINE}/work/gbs/lib/maputils .o \
	sufix ${MACHINE}/work/gbs/lib/trailer .o \
	sufix ${MACHINE}/work/gbs/lib/version .o \
	sufix ${MACHINE}/work/xl/compress .o \
	sufix ${MACHINE}/work/image/zlib .o \
	sufix ${MACHINE}/work/arch/unix/main/cmdline .o \
	sufix ${MACHINE}/work/arch/unix/machine/${MACHINE} .o \
\
	file ${MACHINE}/work/version xl.o gb.o \
	file ${MACHINE}/work/version \
			landscape.posix.${MACHINE}.${to_leaf}.ver.o \
	file ${MACHINE}/work/version ${MVER}.o \
	file ${MACHINE}/work/version source.ver.o \
	file ${MACHINE}/work/version gb.lib.ver.o \
	file ${MACHINE}/work/version xl.lib.ver.o

.set	VTAR	version/landscape.posix.${MACHINE}.${to_leaf}.ver

.(neq,${VER},-off) do \
	${VERSION} ${V_FLAGS} \
		-app ${to} \
		-object ${from} \
		-work ../${VTAR} \
		-c ../../src/${VTAR}.c \
		-msg GB pdbp \(progressive polygon\) agent

.(nexist,${MACHINE}/work/${VTAR}.o)		finish
.(nexist,${MACHINE}/work/version/${MVER}.o)	finish
.(nexist,${MACHINE}/work/version/xl.lib.ver.o)	finish
.(nexist,${MACHINE}/work/version/source.ver.o)	finish
.(nexist,${MACHINE}/work/version/gb.lib.ver.o)	finish
.(eq,${LINKSKIP},on)				finish

	${CC} -o ${to} ${LFLAGS} ${from} ${Z_LIB} ${M_LIB} ${N_LIB}




@ make file ${MACHINE}/bin/svg2pp from \
	sufix ${MACHINE}/work/pdb/svg2pp .o \
	sufix ${MACHINE}/work/pdb/fa .o \
	sufix ${MACHINE}/work/longchar/std .o \
	sufix ${MACHINE}/work/longchar/wct0 .o \
	sufix ${MACHINE}/work/stream .o \
	sufix ${MACHINE}/work/arch/unix/std .o \
	sufix ${MACHINE}/work/utils .o \
	sufix ${MACHINE}/work/xl/lib .o \
	sufix ${MACHINE}/work/xl/function .o \
	file ${MACHINE}/work/memory_debug \
			memory_debug.o \
	sufix ${MACHINE}/work/endian .o \
	sufix ${MACHINE}/work/gbs/lib/maputils .o \
	sufix ${MACHINE}/work/arch/unix/main/cmdline .o \
	sufix ${MACHINE}/work/arch/unix/machine/${MACHINE} .o \
\
	file ${MACHINE}/work/version xl.o \
	file ${MACHINE}/work/version landscape.posix.${MACHINE}.${to_leaf}.ver.o \
	file ${MACHINE}/work/version ${MVER}.o \
	file ${MACHINE}/work/version source.ver.o \
	file ${MACHINE}/work/version xl.lib.ver.o

.set	VTAR	version/landscape.posix.${MACHINE}.${to_leaf}.ver

.(neq,${VER},-off) do \
	${VERSION} ${V_FLAGS} \
		-app ${to} \
		-object ${from} \
		-work ../${VTAR} \
		-c ../../src/${VTAR}.c \
		-msg svg to pp \(progressive polygon\) format converter

.(nexist,${MACHINE}/work/${VTAR}.o)		finish
.(nexist,${MACHINE}/work/version/${MVER}.o)	finish
.(nexist,${MACHINE}/work/version/xl.lib.ver.o)	finish
.(nexist,${MACHINE}/work/version/source.ver.o)	finish
.(eq,${LINKSKIP},on)				finish

	${CC} -o ${to} ${LFLAGS} ${from} ${M_LIB} ${N_LIB}


# stop







@ make file ${MACHINE}/bin/xllock from \
	sufix ${MACHINE}/work/xl/lock .o \
	sufix ${MACHINE}/work/longchar/std .o \
	sufix ${MACHINE}/work/longchar/wct0 .o \
	sufix ${MACHINE}/work/stream .o \
	sufix ${MACHINE}/work/arch/unix/std .o \
	sufix ${MACHINE}/work/utils .o \
	sufix ${MACHINE}/work/xl/lib .o \
	sufix ${MACHINE}/work/xl/function .o \
	file ${MACHINE}/work/memory_debug \
			memory_debug.o \
	sufix ${MACHINE}/work/endian .o \
	sufix ${MACHINE}/work/arch/unix/main/stab .o \
	sufix ${MACHINE}/work/arch/unix/machine/${MACHINE} .o \
\
	file ${MACHINE}/work/version xl.o \
	file ${MACHINE}/work/version landscape.posix.${MACHINE}.${to_leaf}.ver.o \
	file ${MACHINE}/work/version ${MVER}.o \
	file ${MACHINE}/work/version source.ver.o \
	file ${MACHINE}/work/version xl.lib.ver.o

.set	VTAR	version/landscape.posix.${MACHINE}.${to_leaf}.ver

.(neq,${VER},-off) do \
	${VERSION} ${V_FLAGS} \
		-app ${to} \
		-object ${from} \
		-work ../${VTAR} \
		-c ../../src/${VTAR}.c \
		-msg lock server for GLOBALBASE

.(nexist,${MACHINE}/work/${VTAR}.o)		finish
.(nexist,${MACHINE}/work/version/${MVER}.o)	finish
.(nexist,${MACHINE}/work/version/xl.lib.ver.o)	finish
.(nexist,${MACHINE}/work/version/source.ver.o)	finish
.(eq,${LINKSKIP},on)				finish

	${CC} -o ${to} ${LFLAGS} ${from} ${M_LIB} ${N_LIB}

# stop


@ make file ${MACHINE}/bin/r64status from \
	sufix ${MACHINE}/work/r64 .o \
	sufix ${MACHINE}/work/endian .o \
	sufix ${MACHINE}/work/r64status .o \
	sufix ${MACHINE}/work/arch/unix/std/panic .o \
	sufix ${MACHINE}/work/image/jpeg .o \
	file ${MACHINE}/work/arch/unix/std/utils \
			u_file.o \
\
	file ${MACHINE}/work/version ${MVER}.o \
	file ${MACHINE}/work/version source.ver.o

.set	VTAR	version/landscape.posix.${MACHINE}.${to_leaf}.ver

.(neq,${VER},-off) do \
	${VERSION} ${V_FLAGS} \
		-app ${to} \
		-object ${from} \
		-work ../${VTAR} \
		-c ../../src/${VTAR}.c \
		-msg r64/cr format status viewer

.(nexist,${MACHINE}/work/${VTAR}.o)		finish
.(nexist,${MACHINE}/work/version/source.ver.o)	finish
.(eq,${LINKSKIP},on)				finish

	${CC} -o ${to} ${from} ${M_LIB}

# stop

@ make file ${MACHINE}/bin/makekyotodb from \
	sufix ${MACHINE}/work/pdb/favt .o \
	sufix ${MACHINE}/work/xl/lib .o \
	sufix ${MACHINE}/work/xl/ex_function .o \
	sufix ${MACHINE}/work/pdb/associate .o \
	sufix ${MACHINE}/work/pdb/makekyotodb .o \
	sufix ${MACHINE}/work/pdb/fa .o \
	sufix ${MACHINE}/work/utils .o \
	sufix ${MACHINE}/work/endian .o \
	sufix ${MACHINE}/work/arch/unix/std .o \
	sufix ${MACHINE}/work/stream .o \
	sufix ${MACHINE}/work/longchar/std .o \
	sufix ${MACHINE}/work/longchar/wct .o \
	sufix ${MACHINE}/work/xl/function .o \
	file ${MACHINE}/work/memory_debug \
			memory_debug.o \
	sufix ${MACHINE}/work/gbs/lib/maputils .o \
	sufix ${MACHINE}/work/arch/unix/main/cmdline .o \
	sufix ${MACHINE}/work/arch/unix/machine/${MACHINE} .o \
\
	file ${MACHINE}/work/version xl.o \
	file ${MACHINE}/work/version landscape.posix.${MACHINE}.${to_leaf}.ver.o \
	file ${MACHINE}/work/version ${MVER}.o \
	file ${MACHINE}/work/version source.ver.o \
	file ${MACHINE}/work/version xl.lib.ver.o

.set	VTAR	version/landscape.posix.${MACHINE}.${to_leaf}.ver

.(neq,${VER},-off) do \
	${VERSION} ${V_FLAGS} \
		-app ${to} \
		-object ${from} \
		-work ../${VTAR} \
		-c ../../src/${VTAR}.c \
		-msg making kyoto database

.(nexist,${MACHINE}/work/${VTAR}.o)		finish
.(nexist,${MACHINE}/work/version/${MVER}.o)	finish
.(nexist,${MACHINE}/work/version/xl.lib.ver.o)	finish
.(nexist,${MACHINE}/work/version/source.ver.o)	finish
.(eq,${LINKSKIP},on)				finish

	${CC} -o ${to} ${LFLAGS} ${from} ${M_LIB} ${N_LIB}




@ make file ${MACHINE}/bin/nig2svg from \
	sufix ${MACHINE}/work/pdb/nig2svg .o \
	file ${MACHINE}/work/memory_debug \
			dummy.o \
			x_memory_debug.o \
	sufix ${MACHINE}/work/arch/unix/std/panic .o \
	sufix ${MACHINE}/work/utils/avt .o \
	file ${MACHINE}/work/utils \
			u_log.o \
\
	file ${MACHINE}/work/version \
			landscape.posix.${MACHINE}.${to_leaf}.ver.o \
	file ${MACHINE}/work/version source.ver.o

.set	VTAR	version/landscape.posix.${MACHINE}.${to_leaf}.ver

.(neq,${VER},-off) do \
	${VERSION} ${V_FLAGS} \
		-app ${to} \
		-object ${from} \
		-work ../${VTAR} \
		-c ../../src/${VTAR}.c \
		-msg nigmas to svg format converter

.(nexist,${MACHINE}/work/${VTAR}.o)		finish
.(nexist,${MACHINE}/work/version/source.ver.o)	finish
.(eq,${LINKSKIP},on)				finish

	${CC} -o ${to} ${LFLAGS} ${from} ${M_LIB}





@ make file ${MACHINE}/bin/pdbstatus from \
	sufix ${MACHINE}/work/pdb/status .o \
	sufix ${MACHINE}/work/pdb/fa .o \
	sufix ${MACHINE}/work/endian .o \
	file ${MACHINE}/work/memory_debug \
			x_memory_debug.o \
			dummy.o \
	sufix ${MACHINE}/work/utils/avt .o \
	file ${MACHINE}/work/utils \
			u_log.o \
	sufix ${MACHINE}/work/utils/copy .o \
	sufix ${MACHINE}/work/arch/unix/panic .o \
	sufix ${MACHINE}/work/arch/unix/std/panic .o \
	file ${MACHINE}/work/arch/unix/std/utils \
				u_file.o \
				change_delim.o  \
\
	file ${MACHINE}/work/version \
			landscape.posix.${MACHINE}.${to_leaf}.ver.o \
	file ${MACHINE}/work/version source.ver.o

.set	VTAR	version/landscape.posix.${MACHINE}.${to_leaf}.ver

.(neq,${VER},-off) do \
	${VERSION} ${V_FLAGS} \
		-app ${to} \
		-object ${from} \
		-work ../${VTAR} \
		-c ../../src/${VTAR}.c \
		-msg pdb \(progressive DB\) status viewer

.(nexist,${MACHINE}/work/${VTAR}.o)		finish
.(nexist,${MACHINE}/work/version/source.ver.o)	finish
.(eq,${LINKSKIP},on)				finish

	${CC} -o ${to} ${LFLAGS} ${from} ${M_LIB}


@ make file ${MACHINE}/bin/gbr64 from \
	sufix ${MACHINE}/work/gbs/r64 .o \
	sufix ${MACHINE}/work/longchar/std .o \
	sufix ${MACHINE}/work/longchar/wct0 .o \
	sufix ${MACHINE}/work/stream .o \
	sufix ${MACHINE}/work/arch/unix/std .o \
	sufix ${MACHINE}/work/utils .o \
	sufix ${MACHINE}/work/xl/lib .o \
	sufix ${MACHINE}/work/xl/function .o \
	file ${MACHINE}/work/memory_debug \
			memory_debug.o \
	sufix ${MACHINE}/work/endian .o \
	sufix ${MACHINE}/work/r64 .o \
	sufix ${MACHINE}/work/gbs/lib/version .o \
	sufix ${MACHINE}/work/image .o \
	sufix ${MACHINE}/work/arch/unix/main/cmdline .o \
	sufix ${MACHINE}/work/arch/unix/machine/${MACHINE} .o \
\
	file ${MACHINE}/work/version xl.o gb.o \
	file ${MACHINE}/work/version landscape.posix.${MACHINE}.${to_leaf}.ver.o \
	file ${MACHINE}/work/version ${MVER}.o \
	file ${MACHINE}/work/version source.ver.o \
	file ${MACHINE}/work/version gb.lib.ver.o \
	file ${MACHINE}/work/version xl.lib.ver.o

.set	VTAR	version/landscape.posix.${MACHINE}.${to_leaf}.ver

.(neq,${VER},-off) do \
	${VERSION} ${V_FLAGS} \
		-app ${to} \
		-object ${from} \
		-work ../${VTAR} \
		-c ../../src/${VTAR}.c \
		-msg GB r64/cr agent

.(nexist,${MACHINE}/work/${VTAR}.o)		finish
.(nexist,${MACHINE}/work/version/${MVER}.o)	finish
.(nexist,${MACHINE}/work/version/xl.lib.ver.o)	finish
.(nexist,${MACHINE}/work/version/source.ver.o)	finish
.(nexist,${MACHINE}/work/version/gb.lib.ver.o)	finish
.(eq,${LINKSKIP},on)				finish

	${CC} -o ${to} ${LFLAGS} ${from} ${Z_LIB} ${M_LIB} ${N_LIB}


@ make file ${MACHINE}/bin/vtester from \
	sufix ${MACHINE}/work/vtester .o \
	sufix ${MACHINE}/work/viewlib/std .o \
	file ${MACHINE}/work/arch/unix/viewlib/x11 \
			v_open_disp.o \
			v_window.o \
			v_get_string_pic.o \
			v_get_font.o \
			lc_desc_table.o \
	sufix ${MACHINE}/work/arch/unix/viewlib/gtk .o \
	sufix ${MACHINE}/work/arch/unix/main/window .o \
	sufix ${MACHINE}/work/arch/unix/std/stream .o \
	sufix ${MACHINE}/work/stream .o \
	sufix ${MACHINE}/work/longchar/std .o \
	sufix ${MACHINE}/work/longchar/wct .o \
	sufix ${MACHINE}/work/longchar/window .o \
	sufix ${MACHINE}/work/longchar/html .o \
	sufix ${MACHINE}/work/longchar/function .o \
	sufix ${MACHINE}/work/utils .o \
	sufix ${MACHINE}/work/arch/unix/std/net .o \
	sufix ${MACHINE}/work/arch/unix/std/thread .o \
	sufix ${MACHINE}/work/arch/unix/std/utils .o \
	sufix ${MACHINE}/work/arch/unix/std/panic .o \
	sufix ${MACHINE}/work/xl/function .o \
	sufix ${MACHINE}/work/xl/lc_function .o \
	sufix ${MACHINE}/work/xl/lib .o \
	sufix ${MACHINE}/work/arch/unix/machine/${MACHINE} .o \
	sufix ${MACHINE}/work/endian .o \
	sufix ${MACHINE}/work/image .o \
	sufix ${MACHINE}/work/arch/unix/std/process .o \
	file ${MACHINE}/work/memory_debug \
			memory_debug.o \
	sufix ${MACHINE}/work/ext/gtk+2 .o \
\
	file ${MACHINE}/work/version xl.o gb.o \
	file ${MACHINE}/work/version \
			vtester.posix.${MACHINE}.ver.o \
	file ${MACHINE}/work/version ${MVER}.o \
	file ${MACHINE}/work/version source.ver.o \
	file ${MACHINE}/work/version xl.lib.ver.o

	touch ${MACHINE}/bin/vtester
.(neq,${TOOLKIT},gtk) 	finish
	rm ${MACHINE}/bin/vtester

.set	VTAR	version/vtester.posix.${MACHINE}.ver

.(neq,${VER},-off) do \
	${VERSION} ${V_FLAGS} \
		-app ${to} \
		-object ${from} \
		-work ../${VTAR} \
		-c ../../src/${VTAR}.c \
		-msg VObject tester

.(nexist,${MACHINE}/work/${VTAR}.o)		finish
.(nexist,${MACHINE}/work/version/${MVER}.o)	finish
.(nexist,${MACHINE}/work/version/xl.lib.ver.o)	finish
.(nexist,${MACHINE}/work/version/source.ver.o)	finish
.(nexist,${MACHINE}/work/version/gb.lib.ver.o)	finish
.(eq,${LINKSKIP},on)				finish

	${CPP} -o ${to} ${LFLAGS} ${from} ${Z_LIB} ${TK_LIB} ${M_LIB} ${W_LIB}

# stop

@ make file ${MACHINE}/bin/cosmos from \
	sufix ${MACHINE}/work/gbs/lib/lump .o \
	sufix ${MACHINE}/work/gbs/lib/resource .o \
	sufix ${MACHINE}/work/utils .o \
	sufix ${MACHINE}/work/gbclient .o \
	sufix ${MACHINE}/work/r64 .o \
	sufix ${MACHINE}/work/arch/unix/std .o \
	sufix ${MACHINE}/work/gbs/lib/maputils .o \
	sufix ${MACHINE}/work/endian .o \
	sufix ${MACHINE}/work/http .o \
	sufix ${MACHINE}/work/longchar/std .o \
	sufix ${MACHINE}/work/longchar/wct .o \
	sufix ${MACHINE}/work/longchar/window .o \
	sufix ${MACHINE}/work/longchar/html .o \
	sufix ${MACHINE}/work/longchar/function .o \
	sufix ${MACHINE}/work/stream .o \
	file ${MACHINE}/work/memory_debug \
			memory_debug.o \
	sufix ${MACHINE}/work/xl/lib .o \
	sufix ${MACHINE}/work/xl/function .o \
	sufix ${MACHINE}/work/xl/lc_function .o \
	sufix ${MACHINE}/work/gbs/lib/trailer .o \
	sufix ${MACHINE}/work/gbs/lib/version .o \
	sufix ${MACHINE}/work/image .o \
	sufix ${MACHINE}/work/arch/unix/main/window .o \
	sufix ${MACHINE}/work/arch/unix/machine/${MACHINE} .o \
	sufix ${MACHINE}/work/gbs/lib/view .o \
	sufix ${MACHINE}/work/gbs/lib/viewutils .o \
	sufix ${MACHINE}/work/pdb/favt .o \
	sufix ${MACHINE}/work/pdb/fa .o \
	sufix ${MACHINE}/work/arch/unix/viewlib/gtk .o \
	sufix ${MACHINE}/work/viewlib/std .o \
	sufix ${MACHINE}/work/viewlib/xl .o \
	sufix ${MACHINE}/work/viewlib/gb .o \
	file ${MACHINE}/work/arch/unix/viewlib/x11 \
			v_open_disp.o \
			v_window.o \
			v_get_string_pic.o \
			v_get_font.o \
			lc_desc_table.o \
	sufix ${MACHINE}/work/gbs/lib/rcache .o \
	sufix ${MACHINE}/work/ext/gtk+2 .o \
	sufix ${MACHINE}/work/lib/locator .o \
\
	file ${MACHINE}/work/version xl.o gb.o \
	file ${MACHINE}/work/version \
		cosmos.posix.${MACHINE}.ver.o \
	file ${MACHINE}/work/version ${MVER}.o \
	file ${MACHINE}/work/version source.ver.o \
	file ${MACHINE}/work/version gb.lib.ver.o \
	file ${MACHINE}/work/version xl.lib.ver.o

	touch ${MACHINE}/bin/cosmos
.(neq,${TOOLKIT},gtk) finish
	rm ${MACHINE}/bin/cosmos

.set	VTAR	version/cosmos.posix.${MACHINE}.ver

.(neq,${VER},-off) do \
	${VERSION} ${V_FLAGS} \
		-app ${to} \
		-object ${from} \
		-work ../${VTAR} \
		-c ../../src/${VTAR}.c \
		-msg cosmos GLOBALBASE viewer

.(nexist,${MACHINE}/work/${VTAR}.o)		finish
.(nexist,${MACHINE}/work/version/${MVER}.o)	finish
.(nexist,${MACHINE}/work/version/xl.lib.ver.o)	finish
.(nexist,${MACHINE}/work/version/source.ver.o)	finish
.(nexist,${MACHINE}/work/version/gb.lib.ver.o)	finish
.(eq,${LINKSKIP},on)				finish

	${CPP} -o ${to} ${LFLAGS} ${from} ${Z_LIB} ${TK_LIB} ${M_LIB} ${W_LIB}
	cp -r ../../peripheral ${MACHINE}

# stop

#
#	SOURCE CODE VERSIONS
#

@ make file ${MACHINE}/work/gb.lib.ver from \
	sufix ${MACHINE}/work/gbs/lib .o

.(neq,${VER},-off) do \
	${VERSION} ${VL_FLAGS} \
		-app GB.lib\(ATMOSPHERE\) \
		-object ${from} \
		-work ../version/gb.lib.ver \
		-c ../../src/version/gb.lib.ver.c \
		-code gb_code_version GB.code \
		-msg ATMOSPHERE GLOBALBASE protocol library
	touch ${to}

@ make file ${MACHINE}/work/xl.lib.ver from \
	sufix ${MACHINE}/work/xl/lib .o

.(neq,${VER},-off) do \
	${VERSION} ${VL_FLAGS} \
		-app XL.lib \
		-object ${from} \
		-work ../version/xl.lib.ver \
		-c ../../src/version/xl.lib.ver.c \
		-code xl_code_version XL.code \
		-msg XL protocol library
	touch ${to}

@ make file ${MACHINE}/work/lib.locator.ver from \
	sufix ${MACHINE}/work/lib/locator .o

.(neq,${VER},-off) do \
	${VERSION} ${VL_FLAGS} \
		-app lib.Locator \
		-object ${from} \
		-work ../version/lib.locator.ver \
		-c ../../src/version/lib.locator.ver.c \
		-code locator_code_version lib.Locator.code \
		-msg Locator Library
	touch ${to}

@ make file ${MACHINE}/work/machine.posix.${MACHINE}.lib.ver from \
	sufix ${MACHINE}/work/arch/unix/gbfloader .o \
	sufix ${MACHINE}/work/arch/unix/main .o \
	sufix ${MACHINE}/work/arch/unix/std .o \
	sufix ${MACHINE}/work/arch/unix/viewlib .o \
	sufix ${MACHINE}/work/arch/unix/machine/${MACHINE} .o

.(neq,${VER},-off) do \
	${VERSION} ${VL_FLAGS} \
		-app posix.${MACHINE}.Interface \
		-object ${from} \
		-work ../version/machine.posix.${MACHINE}.lib.ver \
		-c ../../src/version/machine.posix.${MACHINE}.lib.ver.c \
		-code machine_code_version MA.code \
		-msg machine \(posix.${MACHINE}\) dependent library
	touch ${to}

@ make file ${MACHINE}/work/source.ver from \
	sufix ${MACHINE}/work/viewlib .o \
	sufix ${MACHINE}/work/gbjmp .o \
	sufix ${MACHINE}/work/memory_debug .o \
	sufix ${MACHINE}/work/r64status .o \
	sufix ${MACHINE}/work/xl .o \
	sufix ${MACHINE}/work/arch .o \
	sufix ${MACHINE}/work/gbs .o \
	sufix ${MACHINE}/work/pdb .o \
	sufix ${MACHINE}/work/stream .o \
	sufix ${MACHINE}/work/endian .o \
	sufix ${MACHINE}/work/ppm2r64 .o \
	sufix ${MACHINE}/work/utils .o \
	sufix ${MACHINE}/work/gbclient .o \
	sufix ${MACHINE}/work/longchar .o

#	sufix ${MACHINE}/work/image .o \
#	sufix ${MACHINE}/work/r64 .o
#	sufix ${MACHINE}/work/ppm .o \

.(neq,${VER},-off) do \
	${VERSION} ${VL_FLAGS} \
		-app GLOBALBASE.Architecture \
		-object ${from} \
		-work ../version/source.ver \
		-c ../../src/version/source.ver.c \
		-code src_code_version SR.code \
		-msg GLOBALBASE source code
	touch ${to}


@ make file ${MACHINE}/work/machine.posix.${MACHINE}.lib.ver from \
	sufix ${MACHINE}/work/arch/unix/gbfloader .o \
	sufix ${MACHINE}/work/arch/unix/main .o \
	sufix ${MACHINE}/work/arch/unix/std .o \
	sufix ${MACHINE}/work/arch/unix/viewlib .o \
	sufix ${MACHINE}/work/arch/unix/machine/${MACHINE} .o

.(neq,${VER},-off) do \
	${VERSION} ${VL_FLAGS} \
		-app posix.${MACHINE}.Interface \
		-object ${from} \
		-work ../version/machine.posix.${MACHINE}.lib.ver \
		-c ../../src/version/machine.posix.${MACHINE}.lib.ver.c \
		-code machine_code_version MA.code \
		-msg machine \(posix.${MACHINE}\) dependent library
	touch ${MACHINE}/work/machine.posix.${MACHINE}.lib.ver



@(eq,${LINKSKIP},on)	set	VER		-on
#(eq,${LINKSKIP},on)	set	VL_VER		-on
@(eq,${LINKSKIP},on)	set	LINKSKIP	off
