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

Annotation of OpenXM/src/k097/Makefile, Revision 1.7

1.7     ! takayama    1: # $OpenXM: OpenXM/src/k097/Makefile,v 1.6 2000/01/17 01:08:34 takayama Exp $
        !             2: # targets
        !             3: # all
        !             4: #     compile
        !             5: # intall : all
        !             6: #
        !             7: # todo : install-lib, install-for-debug, install-lib-for-debug
        !             8: #
1.1       maekawa     9: BDATE =19970416
                     10: CC = gcc
                     11: GC = $(KHOME)/gc/gc.a
                     12:
                     13: ## Kan source.  kan sources must be built up by hand.
1.6       takayama   14: KHOME = ../kan96xx
1.1       maekawa    15:
                     16:
                     17: ##
                     18: LOAD_K_PATH ='"/usr/local/lib/k0/"'
                     19: LOAD_SM1_PATH2 ='"/home/nobuki/SSkan/Kan/"'
                     20: ##
                     21: GMP_HOME = $(KHOME)/gmp
1.4       takayama   22: LIBGMP=$(GMP_HOME)/libgmp.a
1.1       maekawa    23: ## This line is for buggy linux-gmp.
1.4       takayama   24: ## LIBGMP = $(GMP_HOME)/libgmp.a $(GMP_HOME)/mpn/libmpn.a
1.1       maekawa    25: EXTRALIB =
                     26: ########### end of configuration.
                     27:
                     28: ### These are to switch k2 linux and k2 solaris version.
1.2       takayama   29: SOLARIS_SLIB =   -lsocket -lnsl -lc /usr/ucblib/libucb.a
1.1       maekawa    30: ### if you use K2LFLAG below, you don't need ALIB.
                     31: #K2LFLAG = -lm $(SOLARIS_ALIB)
                     32: K2LFLAG = -lfunc -lparse -lengine -lm -Wl,-rpath,/usr/X11R6/lib
                     33: #CALL_ASIR=callasir.solaris.c
                     34: CALL_ASIR=callasir.c
                     35: PARI_LIB = -lpari
                     36: ###########################################################
                     37: SOLARIS_ALIB =  -L$(AHOME)/usrlib $(AHOME)/io/tcpf.o $(AHOME)/plot/plotf.o $(AHOME)/builtin/libfunc.a $(AHOME)/parse/libparse.a $(AHOME)/io/libio.a $(AHOME)/engine/libca.a $(AHOME)/asm/libasm.a  $(PARI_LIB) $(SOLARIS_SLIB)
                     38: SOLARIS_EXTRA_INCLUDE = -I$(AHOME)/parse -I$(AHOME)/io
                     39: ###########################################################
                     40:
                     41: CC = gcc
                     42: MYYACC = bison
                     43: YACCPREFIX = -p KC
                     44: FLAG = -g  -DLOAD_K_PATH=$(LOAD_K_PATH) -DLOAD_SM1_PATH2=$(LOAD_SM1_PATH2)
                     45: KAN_HOME = $(KHOME)/Kan
                     46:
                     47: all : d0 k0
                     48:
                     49: ## Making a new Makefile
                     50: new :
                     51:        touch Makefile.new
                     52:        /bin/cp Makefile.new Trash
                     53:        /bin/rm -f Makefile.new
                     54:        sed -f new.sed <Makefile >Makefile.new
                     55:
                     56: d0 : simple.tab.o d.o dic.o dm.c
                     57:        $(CC) $(FLAG) -o d0 dm.c d.o dic.o simple.tab.o
                     58:
                     59: d.o : d.c simple.tab.h Stable/sm1symbol.h
                     60:        $(CC) $(FLAG) -o d.o -c d.c
                     61:
                     62: simple.tab.o : simple.tab.c
                     63:        $(CC) $(FLAG) -o simple.tab.o -c simple.tab.c
                     64:
                     65: simple.tab.c : simple.y d.h
                     66:        $(MYYACC) $(YACCPREFIX) simple.y
                     67:
                     68: simple.tab.h : simple.y d.h
                     69:        $(MYYACC) $(YACCPREFIX) -d simple.y
                     70:
                     71: Stable/sm1symbo.h : Stable/reserved.txt
                     72:        (cd Stable; make)
                     73:
                     74: clean :
                     75:        rm -f simple d0 k0 test0 *.o *~  simple.output asir-tmp.t asir-tmp.tt asir-tmp-out.t asir-tmp-out.tt k2
                     76:        (cd Stable; make clean)
                     77:        (cd try; make clean)
                     78: ##     rm -f simple.tab.c simple.tab.h
                     79:
                     80: backup :
                     81:        cp simple.y d.c dm.c k2.c ki.c msg*.c d.h Makefile  *.k incmac.sm1 memo.txt Backup/backup$(BDATE)
                     82:
                     83: test:   d0
                     84:        touch t.sm1
                     85:        /bin/rm t.sm1
                     86:        ./d0 <test.ccc >t.sm1
                     87:
                     88: slib:   d0
                     89:        touch slib.sm1
                     90:        /bin/rm slib.sm1
                     91:        ./d0 -DebugMode <slib.k >slib.sm1
                     92:
                     93: ####################################################################
                     94: #############    kxx main parts.
                     95: ###################################################################
                     96: KXX = simple.tab.o d.o ki.o dic.o
                     97: KXXASIR = simple.tab.o d.o ki-asir.o dic.o
                     98:
                     99: k0 :  k0.o $(KXX) $(KAN_HOME)/kanlib.a $(GC) $(GMP) $(KAN_HOME)/lookup.h
1.2       takayama  100:        if test `uname` = "SunOS" ; \
                    101:        then \
                    102:        $(CC) $(FLAG) -I$(GMP_HOME) -I$(KAN_HOME) -o k0 k0.o $(KXX)  $(KAN_HOME)/kanlib.a $(LIBGMP) $(GC) $(EXTRALIB) $(SOLARIS_SLIB) ; \
                    103:        else \
                    104:        $(CC) $(FLAG) -I$(GMP_HOME) -I$(KAN_HOME) -o k0 k0.o $(KXX)  $(KAN_HOME)/kanlib.a $(LIBGMP) $(GC) $(EXTRALIB) ; \
                    105:        fi
1.1       maekawa   106:
                    107: k0.o : k2.c
                    108:        $(CC) -c $(FLAG) -I$(GMP_HOME) -I$(KAN_HOME) -o k0.o k2.c
                    109:
                    110: ki.o : ki.c
                    111:        $(CC) -c $(FLAG) -I$(GMP_HOME) -I$(KAN_HOME) -o ki.o ki.c
                    112:
                    113: ki-asir.o : ki.c
                    114:        $(CC) -c $(FLAG) -DCALLASIR -I$(GMP_HOME) -I$(KAN_HOME) -o ki-asir.o ki.c
                    115:
                    116: dic.o : dic.c d.h
                    117:        $(CC) -c $(FLAG)  -o dic.o dic.c
                    118:
                    119: $(KAN_HOME)/kanlib.a : $(KAN_HOME)/sm1
                    120:        (cd $(KAN_HOME); make kanlib.a)
                    121:
                    122: kanlib.a :
                    123:        (cd $(KAN_HOME); make kanlib.a)
                    124:
                    125: $(KAN_HOME)/lookup.h :
                    126:        (cd $(KAN_HOME); make lookup.h)
                    127:
                    128: ######## How to make k2.  k2 is k0&asir&sm1
                    129: ## asir GC.
                    130: ASIRGC = $(AHOME)/gc/libgc.a
                    131: ## asir include
                    132: ASIR_INCLUDE = $(AHOME)/include
                    133: ASIR_INCLUDE2 = $(ALIB)/include
                    134: LFLAG = $(K2LFLAG)
                    135: GMP = $(LIBGMP)
                    136: ASIRKAN = $(ASIRKAN_HOME)/ak.a
                    137: K2INCLUDE = -I$(ASIR_INCLUDE)  -I$(ASIR_INCLUDE2) -I$(KHOME)/Kan -I$(ASIRKAN_HOME) $(SOLARIS_EXTRA_INCLUDE)
                    138:
                    139: k2 : k2.c $(KAN_HOME)/kanlib.a  $(KXXASIR) msg1.o $(ASIRKAN) $(ASIRKAN_HOME)/$(CALL_ASIR) $(ASIRGC) $(GMP)
                    140:        $(CC) $(FLAG) -DCALLASIR $(K2INCLUDE) -o k2 k2.c $(KXXASIR) msg1.o  $(ASIRKAN_HOME)/$(CALL_ASIR) -L/usr/X11R6/lib -L$(ALIB) $(LFLAG) $(KAN_HOME)/kanlib.a $(ASIRKAN) $(GMP) $(ASIRGC)
                    141:
                    142: msg1.o : msg1.c
                    143:        $(CC) $(FLAG) -DCALLASIR $(K2INCLUDE) -c msg1.c
                    144:
                    145:
                    146: $(ASIRKAN) :
                    147:        (cd $(ASIRKAN_HOME); make ak.a)
                    148:
                    149:
                    150: $(GMP) :
                    151:        (cd $(KHOME)/gmp ; ./configure; make )
                    152: $(GC) :
                    153:        (cd $(KHOME)/gc ; make )
                    154:
                    155:
                    156: ##########
                    157: ## A sample to compilation:  source is test0.c, output is test0
                    158: test0 :  test0.c  $(KXX) $(KAN_HOME)/kanlib.a  $(GC) $(GMP) $(KAN_HOME)/lookup.h
                    159:        $(CC) $(FLAG) -I$(GMP_HOME) -I$(KAN_HOME) -o test0 test0.c $(KXX) $(KAN_HOME)/kanlib.a $(LIBGMP) $(GC)
                    160:
                    161:
                    162:
1.3       takayama  163: install0 : all
1.5       takayama  164:        cp -f k0 d0 $(HOME)/.Hbin
1.1       maekawa   165:        cp lib/mklib $(HOME)/.Hbin
                    166:        echo "Set the environment variable in $(HOME)/bin/mklib"
1.3       takayama  167:
                    168: install : all
1.5       takayama  169:        cp -f k0 d0 ../../bin
1.1       maekawa   170:
                    171: dist :
                    172:        ./makeDist

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>