[BACK]Return to Makefile CVS log [TXT][DIR] Up to [local] / OpenXM / src / kxx

File: [local] / OpenXM / src / kxx / Attic / Makefile (download)

Revision 1.14, Sun Jan 2 07:35:15 2000 UTC (24 years, 4 months ago) by takayama
Branch: MAIN
Changes since 1.13: +11 -23 lines

A draft of English translation of openxxx.tex.
I will continue to work on it at Berkeley from after tomorrow.

######### configurations.    
##  $OpenXM: OpenXM/src/kxx/Makefile,v 1.14 2000/01/02 07:35:15 takayama Exp $
KANHOME = ../SSkan

LFLAG =
SOLARISLFLAG = -lnsl -lsocket /usr/ucblib/libucb.a

CFLAGS = -g

########## end of configurations
### Set the server name in oxmain.c if you do not use the environmental
### variable LOAD_SM1_PATH.  cf. $KANHOME/lib/ox.sm1

all : all-plugin kanlib.a ox ox_sm1  oxlog oxweave

all2 : all-plugin kanlib.a ox ox_sm1 testclient oxlog

dist : 
	./makeDist

## ox_null can no longer be compiled.

## This is the Makefile at kxx.
## 1998, 2/7  , Old version is at S/kan.backup/kxx.tar.gz.19980206
##
.c.o :
	gcc  $(CFLAGS) -c  $<

all-plugin :
	(cd $(KANHOME)/plugin ; make )
kanlib.a :
	(cd $(KANHOME)/Kan ; make kanlib.a)
ox.a : 
	/bin/rm -f ox.a
	ln -s $(KANHOME)/plugin/ox.a ox.a
ox_kan.h :
	/bin/rm -f ox_kan.h
	ln -s $(KANHOME)/plugin/ox_kan.h ox_kan.h

ox : oxmain.c $(KANHOME)/plugin/mytcpio.o $(KANHOME)/plugin/oxmisc.o file2.o ox_kan.h
	if test `uname` = "SunOS" ; \
	then \
	gcc $(CFLAGS) oxmain.c $(KANHOME)/plugin/mytcpio.o $(KANHOME)/plugin/oxmisc.o file2.o -o ox  $(SOLARISLFLAG) ; \
	else \
	gcc $(CFLAGS) oxmain.c $(KANHOME)/plugin/mytcpio.o $(KANHOME)/plugin/oxmisc.o file2.o -o ox  $(LFLAG) ; \
	fi

ox_null : oxserver00.c ox.a nullstackmachine.o file2.o ox_kan.h
	if test `uname` = "SunOS" ; \
	then \
	gcc $(CFLAGS) oxserver00.c ox.a nullstackmachine.o file2.o -o ox_null  $(SOLARISLFLAG) ; \
	else \
	gcc $(CFLAGS) oxserver00.c ox.a nullstackmachine.o file2.o -o ox_null  $(LFLAG) ; \
	fi

ox_sm1 : oxserver00.c sm1stackmachine.o ox_kan.h ox.a $(KANHOME)/Kan/kanlib.a
	(cd $(KANHOME)/Kan ; make kanlib.a)
	if test `uname` = "SunOS" ; \
	then \
	gcc $(CFLAGS) oxserver00.c sm1stackmachine.o -o ox_sm1  $(SOLARISLFLAG) $(KANLIB) ; \
	else \
	gcc $(CFLAGS) oxserver00.c sm1stackmachine.o -o ox_sm1  $(LFLAG) $(KANLIB) ; \
	fi

oxlog : oxlog.c
	gcc -o oxlog oxlog.c

oxweave : oxweave.c oxweaveUsage.h
	gcc -o oxweave -g oxweave.c

## file2.c file2.h is in SSkan/plugin/
file2.o : $(KANHOME)/plugin/file2.c  $(KANHOME)/plugin/file2.h
	gcc $(CFLAGS) -DKXX=1 -I$(KANHOME)/plugin -c $(KANHOME)/plugin/file2.c 

nullstackmachine.o : nullstackmachine.c ox_kan.h
sm1stackmachine.o : sm1stackmachine.c  ox_kan.h

testclient : testclient.c ox.a file2.o ox_kan.h
	gcc $(CFLAGS) testclient.c -o testclient ox.a file2.o $(LFLAG)


#KANLIB = $(KANHOME)/Kan/kanlib.a $(KANHOME)/gmp/libgmp.a $(KANHOME)/gmp/mpn/libmpn.a $(KANHOME)/gc/gc.a
KANLIB = $(KANHOME)/Kan/kanlib.a $(KANHOME)/gmp/libgmp.a $(KANHOME)/gc/gc.a

## file2 should be linked from kanlib.a

testclient2a : testclient2.c ox.a  ox_kan.h $(KANHOME)/Kan/kanlib.a
	gcc $(CFLAGS) -I$(KANHOME)/Kan testclient2.c ox.a  -o testclient2a  $(LFLAG) $(KANLIB)

testclient2 : testclient2.c  ox_kan.h $(KANHOME)/Kan/kanlib.a ox.a
	gcc $(CFLAGS) -I$(KANHOME)/Kan testclient2.c -o testclient2  $(LFLAG) $(KANLIB)


clean :
	/bin/rm -f ox testclient ox_null ox_sm1 testclient2 core *.o a.out *.dvi *.aux openxxx.log  ox_sm1 oxlog *~ oxweave openxm-eg.tex openxm-jp.tex


install_lib_bin :
	/bin/rm -f $(KANHOME)/lib/bin/ox*
	ln -f -s ../../../bin/ox $(KANHOME)/lib/bin/ox
	ln -f -s ../../../bin/oxlog $(KANHOME)/lib/bin/oxlog
	ln -f -s ../../../bin/ox_sm1 $(KANHOME)/lib/bin/ox_sm1
	ln -f -s ./ox_sm1 $(KANHOME)/lib/bin/ox_sm1_forAsir
	ln -f -s ./ox_sm1 $(KANHOME)/lib/bin/ox_sm1_gnuplot
	ln -f -s ./ox_sm1 $(KANHOME)/lib/bin/ox_sm1_phc
	ln -f -s ./ox_sm1 $(KANHOME)/lib/bin/ox_sm1_tigers
	ln -f -s ./ox_sm1 $(KANHOME)/lib/bin/ox_sm1_basicCD

install : install_lib_bin
	/bin/rm -f ../bin/ox ../bin/ox_sm1 ../bin/oxlog ../bin/oxweave
	cp  ox ox_sm1 oxlog oxweave ../bin

install2 : install_lib_bin
	/bin/rm -f ../bin/ox ../bin/ox_sm1 ../bin/oxlog ../bin/oxweave
	ln -f -s  ../src/kxx/ox ../bin/ox
	ln -f -s  ../src/kxx/ox_sm1 ../bin/ox_sm1
	ln -f -s  ../src/kxx/oxlog ../bin/oxlog
	ln -f -s  ../src/kxx/oxweave ../bin/oxweave


configure:
	/bin/rm -f ox_kan.h 
	ln -f -s  ../SSkan/plugin/ox_kan.h ox_kan.h

OXWEAVEFLAG=--recursive
doc:  openxxx.tex
	-/bin/rm openxm-eg.tex openxm-jp.tex
	echo "% DO NOT EDIT THIS FILE. This is automatically generated from openxxx.tex" >openxm-eg.tex
	echo "% DO NOT EDIT THIS FILE. This is automatically generated from openxxx.tex" >openxm-jp.tex
	./oxweave $(OXWEAVEFLAG) C eg <openxxx.tex >>openxm-eg.tex
	./oxweave $(OXWEAVEFLAG) C jp <openxxx.tex >>openxm-jp.tex

clean-binary :
	echo " ../open-sm1-binary*  will be removed"
	echo "after 10 seconds. To cancel type in ctrl-C."
	( sleep 10 ; /bin/rm -rf ../open-sm1-binary* )