File:  [LON-CAPA] / capa / capa51 / pProj / Makefile
Revision 1.10: download - view: text, annotated - select for diffs
Fri Jul 7 18:33:03 2000 UTC (23 years, 10 months ago) by albertel
Branches: MAIN
CVS tags: HEAD
- updating GPL notices

    1: # ==================================================================
    2: #     Makefile for CAPA 5.1
    3: # ==================================================================
    4: #  Copyright (C) 1992-2000 Michigan State University
    5: #
    6: #  The CAPA system is free software; you can redistribute it and/or
    7: #  modify it under the terms of the GNU Library General Public License as
    8: #  published by the Free Software Foundation; either version 2 of the
    9: #  License, or (at your option) any later version.
   10: #
   11: #  The CAPA system is distributed in the hope that it will be useful,
   12: #  but WITHOUT ANY WARRANTY; without even the implied warranty of
   13: #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   14: #  Library General Public License for more details.
   15: #
   16: #  You should have received a copy of the GNU Library General Public
   17: #  License along with the CAPA system; see the file COPYING.  If not,
   18: #  write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
   19: #
   20: #  Boston, MA 02111-1307, USA. 
   21: #  As a special exception, you have permission to link this program
   22: #  with the TtH/TtM library and distribute executables, as long as you
   23: #  follow the requirements of the GNU GPL in regard to all of the
   24: #  software in the executable aside from TtH/TtM.
   25: 
   26: 
   27: 
   28: VER = 5.1
   29: BUGFIX = 1
   30: #CC = i486-linuxlibc1-gcc  -DCAPA_VER=\"$(VER).$(BUGFIX)\" -DCOMPILE_DATE=\"`date +'%b-%d-%Y'`\" 
   31: CC = cc  -DCAPA_VER=\"$(VER).$(BUGFIX)\" -DCOMPILE_DATE=\"`date +'%b-%d-%Y-%H:%M'`\" 
   32: DEF = -DUSE_DYNAMIC_SYMBOLS $(TTH_DEF) #-DLEX_DBUG 
   33: LEX = flex -Cfa -s
   34: YACC = bison
   35: AR = ar
   36: MV = mv
   37: RM = rm
   38: STRIP = echo 
   39: #STRIP = strip
   40: LEXFLAG = -v
   41: 
   42: # OSF1, SunOS, Linux, NEXTSTEP, HP-UX, IRIX
   43: 
   44: TTH_SRC=
   45: #TTH_SRC=../../tth/tthdynamic/tthfunc.c
   46: TTH_OBJ=
   47: #TTH_OBJ=$(ARCH)/tthfunc.o
   48: TTH_DEF=
   49: #TTH_DEF=-DTTH
   50: 
   51: ARCH = $(shell uname)
   52: Linux = /usr/lib/libncurses.a 
   53: OSF1 = -lcurses #-ltermcap
   54: SunOS = /home/capa/source/lib/libncurses.a
   55: Linux = /usr/lib/libncurses.a 
   56: NEXTSTEP = -lcurses -ltermcap
   57: HP-UX = -lcurses -ltermcap
   58: IRIX = -lcurses -ltermcap
   59: FreeBSD = -lncurses -ltermcap
   60: 
   61: P_FLAGS =  -ll -lm 
   62: 
   63: S_FLAGS =  $($(ARCH)) $(P_FLAGS)
   64: 
   65: OSF1FLAG = -O3 -Olimit 2048
   66: AIXFLAG=-O3 -DAIX $(DEF)
   67: NEXTSTEPFLAG=-arch i386 -arch m68k $(DEF)
   68: SunOSFLAG=-xO3 $(DEF)
   69: HP-UXFLAG=-O -Ae -Dhpux $(DEF)
   70: IRIXFLAG=-O2 -DIRIX $(DEF)
   71: LinuxFLAG=-g -Wall $(DEF)
   72: 
   73: CFLAG=$($(ARCH)FLAG)
   74: 
   75: PAR_SRC = capaLexerFun.c capaParserFun.c capaFormulaParser.c capaFunction.c \
   76: 	  capaParserUtils.c capaMapExpr.c capaUnit.c com.c linpack.c ranlib.c \
   77:           capaCgiUtils.c capaSubjective.c capaRQO.c capaFormulaLexer.c \
   78: 	  capaFormulaParser.c capaCommon.c $(TTH_SRC)
   79: 
   80: PAR_OBJ = $(PAR_SRC:.c=.o)
   81: 
   82: ARCH_OBJ = $(ARCH)/capaFormulaParser.o $(ARCH)/capaLexerFun.o $(ARCH)/capaParserFun.o \
   83: 	   $(ARCH)/capaFunction.o $(ARCH)/capaParserUtils.o $(ARCH)/capaMapExpr.o \
   84: 	   $(ARCH)/capaUnit.o $(ARCH)/com.o $(ARCH)/linpack.o $(ARCH)/ranlib.o \
   85:            $(ARCH)/capaCgiUtils.o $(ARCH)/capaSubjective.o $(ARCH)/capaRQO.o \
   86: 	   $(ARCH)/capaFormulaLexer.o $(ARCH)/capaCommon.o $(TTH_OBJ)
   87: ## ===================================================================
   88: 
   89: #  conditional macros in alpha 
   90: #
   91: # libcapa:=MACRO=string
   92: 
   93: 
   94: all: $(ARCH) $(ARCH)/libcapa$(VER).a $(ARCH)/qzparse $(ARCH)/capalogin $(ARCH)/capahtml $(ARCH)/capasbin $(ARCH)/allcapaid 
   95: 
   96: $(ARCH): 
   97: 	mkdir $(ARCH)
   98: 
   99: dmalloc: 
  100: 	$(MAKE) DEF="-DDMALLOC -DDMALLOC_FUNC_CHECK $(DEF)" P_FLAGS="-ldmalloc $(P_FLAGS)" libcapa capasbin
  101: 
  102: libcapa: $(ARCH)/libcapa$(VER).a 
  103: 
  104: $(ARCH)/capalogin: $(ARCH)/capalogin.o $(ARCH)/libcapa$(VER).a 
  105: 	$(CC) $(CFLAG) -o $@ $^ $(S_FLAGS)
  106: 
  107: capalogin: $(ARCH)/capalogin 
  108: 	true
  109: 
  110: $(ARCH)/capahtml:  capaHTML.c $(ARCH)/libcapa$(VER).a 
  111: 	$(CC) $(CFLAG) -o $@ $< $(ARCH)/libcapa$(VER).a $(P_FLAGS)
  112: 
  113: capahtml: $(ARCH)/capahtml
  114: 	true
  115: 
  116: $(ARCH)/capasbin: capaHTML.c $(ARCH)/libcapa$(VER).a
  117: 	$(CC) $(CFLAG) -o $@ $< -DCAPA_WEB $(ARCH)/libcapa$(VER).a $(P_FLAGS)
  118: 
  119: capasbin: $(ARCH)/capasbin
  120: 	true
  121: 
  122: $(ARCH)/allcapaid: allcapaid.c $(ARCH)/libcapa$(VER).a
  123: 	$(CC) $(CFLAG) -o $@ $< $(ARCH)/libcapa$(VER).a $(P_FLAGS)
  124: 
  125: allcapaid: $(ARCH)/allcapaid
  126: 	true
  127: 
  128: $(ARCH)/qzparse: qzparse.c $(ARCH)/libcapa$(VER).a
  129: 	$(CC) $(CFLAG) -o $@ $< $(ARCH)/libcapa$(VER).a $(P_FLAGS)
  130: 
  131: qzparse: $(ARCH)/qzparse
  132: 	true
  133: 
  134: $(ARCH)/libcapa$(VER).a: $(ARCH_OBJ) $(PAR_SRC)
  135: 	$(AR) r $(ARCH)/libcapa$(VER).a $(ARCH_OBJ) 
  136: 
  137: binclean:
  138: 	$(RM) $(ARCH)/*.o $(ARCH)/*.a
  139: 
  140: $(ARCH)/%.o: %.c capaToken.h 
  141: 	$(CC) $(CFLAG) -c $< -o $@ $(DEF)
  142: 
  143: $(ARCH)/tthfunc.o: $(TTH_SRC)
  144: 	$(CC) $(CFLAG) -c $< -o $@ $(DEF)
  145: 
  146: $(ARCH)/convert: $(ARCH)libcapa($VER).a $(ARCH)/convert.o
  147: 	$(CC) $(CFLAG) $(DEF) -o $@ $(ARCH)/convert.o -L$(ARCH) -lcapa$(VER) $(P_FLAGS)
  148: 
  149: capaToken.h: capaGrammarDef.y
  150: 	$(YACC) -d $< --output=capaParserFun.c
  151: 	mv capaParserFun.h capaToken.h
  152: 
  153: capaForumla.h: capaFormula.y
  154: 	$(YACC) -d $< -p fml_ --output=$@
  155: 	mv capaFormulaParser.h capaFormula.h
  156: 
  157: capaParserFun.c: capaGrammarDef.y
  158: 	$(YACC) -d $< --output=$@
  159: 	mv capaParserFun.h capaToken.h
  160: 
  161: capaLexerFun.c: capaLexerDef.flex capaToken.h
  162: 	$(LEX) -o$@ $<
  163: 
  164: capaFormulaParser.c: capaFormula.y
  165: 	$(YACC) -d $< -p fml_ --output=$@
  166: 	mv capaFormulaParser.h capaFormula.h
  167: 
  168: clean:
  169: 	rm -f $(ARCH)/*.o
  170: 	rm -f $(ARCH)/libcapa$(VER).a
  171: 	rm -f capaToken.h capaParserFun.c capaLexerFun.c capaFormula.h \
  172: 		capaFormulaParser.c
  173: 

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