Annotation of capa/capa51/pProj/Makefile, revision 1.8
1.1 albertel 1: # ==================================================================
2: # Makefile for CAPA 5.1
3: # ==================================================================
1.7 albertel 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: # Boston, MA 02111-1307, USA.
20:
1.1 albertel 21:
22: VER = 5.1
1.6 albertel 23: BUGFIX = 1
1.1 albertel 24: #CC = i486-linuxlibc1-gcc -DCAPA_VER=\"$(VER).$(BUGFIX)\" -DCOMPILE_DATE=\"`date +'%b-%d-%Y'`\"
1.2 albertel 25: CC = cc -DCAPA_VER=\"$(VER).$(BUGFIX)\" -DCOMPILE_DATE=\"`date +'%b-%d-%Y-%H:%M'`\"
1.6 albertel 26: DEF = -DUSE_DYNAMIC_SYMBOLS $(TTH_DEF) #-DLEX_DBUG
27: LEX = flex -Cfa -s
1.1 albertel 28: YACC = bison
29: AR = ar
30: MV = mv
31: RM = rm
32: STRIP = echo
33: #STRIP = strip
34: LEXFLAG = -v
35:
36: # OSF1, SunOS, Linux, NEXTSTEP, HP-UX, IRIX
37:
1.6 albertel 38: #TTH_SRC=
39: TTH_SRC=../../tth/tthdynamic/tthfunc.c
40: #TTH_OBJ=
41: TTH_OBJ=$(ARCH)/tthfunc.o
42: #TTH_DEF=
43: TTH_DEF=-DTTH
44:
1.1 albertel 45: ARCH = $(shell uname)
1.6 albertel 46: Linux = /usr/lib/libncurses.a
1.1 albertel 47: OSF1 = -lcurses #-ltermcap
48: SunOS = /home/capa/source/lib/libncurses.a
1.4 albertel 49: Linux = /usr/lib/libncurses.a
1.1 albertel 50: NEXTSTEP = -lcurses -ltermcap
51: HP-UX = -lcurses -ltermcap
52: IRIX = -lcurses -ltermcap
53: FreeBSD = -lncurses -ltermcap
54:
1.6 albertel 55: P_FLAGS = -ll -lm
1.1 albertel 56:
57: S_FLAGS = $($(ARCH)) $(P_FLAGS)
58:
59: OSF1FLAG = -O3 -Olimit 2048
1.6 albertel 60: AIXFLAG=-O3 -DAIX $(DEF)
61: NEXTSTEPFLAG=-arch i386 -arch m68k $(DEF)
62: SunOSFLAG=-xO3 $(DEF)
63: HP-UXFLAG=-O -Ae -Dhpux $(DEF)
64: IRIXFLAG=-O2 -DIRIX $(DEF)
65: LinuxFLAG=-g -Wall $(DEF)
66:
67: CFLAG=$($(ARCH)FLAG)
68:
1.7 albertel 69: PAR_SRC = capaLexerFun.c capaParserFun.c capaFormulaParser.c capaFunction.c \
1.6 albertel 70: capaParserUtils.c capaMapExpr.c capaUnit.c com.c linpack.c ranlib.c \
71: capaCgiUtils.c capaSubjective.c capaRQO.c capaFormulaLexer.c \
1.7 albertel 72: capaFormulaParser.c capaCommon.c $(TTH_SRC)
1.1 albertel 73:
74: PAR_OBJ = $(PAR_SRC:.c=.o)
75:
1.7 albertel 76: ARCH_OBJ = $(ARCH)/capaFormulaParser.o $(ARCH)/capaLexerFun.o $(ARCH)/capaParserFun.o \
1.6 albertel 77: $(ARCH)/capaFunction.o $(ARCH)/capaParserUtils.o $(ARCH)/capaMapExpr.o \
78: $(ARCH)/capaUnit.o $(ARCH)/com.o $(ARCH)/linpack.o $(ARCH)/ranlib.o \
79: $(ARCH)/capaCgiUtils.o $(ARCH)/capaSubjective.o $(ARCH)/capaRQO.o \
1.7 albertel 80: $(ARCH)/capaFormulaLexer.o $(ARCH)/capaCommon.o $(TTH_OBJ)
1.1 albertel 81: ## ===================================================================
82:
83: # conditional macros in alpha
84: #
85: # libcapa:=MACRO=string
86:
87:
1.6 albertel 88: all: $(ARCH) $(ARCH)/libcapa$(VER).a $(ARCH)/qzparse $(ARCH)/capalogin $(ARCH)/capahtml $(ARCH)/capasbin $(ARCH)/allcapaid
89:
90: $(ARCH):
91: mkdir $(ARCH)
1.1 albertel 92:
93: dmalloc:
1.6 albertel 94: $(MAKE) DEF="-DDMALLOC -DDMALLOC_FUNC_CHECK $(DEF)" P_FLAGS="-ldmalloc $(P_FLAGS)" libcapa capasbin
95:
96: libcapa: $(ARCH)/libcapa$(VER).a
97:
98: $(ARCH)/capalogin: $(ARCH)/capalogin.o $(ARCH)/libcapa$(VER).a
99: $(CC) $(CFLAG) -o $@ $^ $(S_FLAGS)
100:
101: capalogin: $(ARCH)/capalogin
102: true
1.1 albertel 103:
1.6 albertel 104: $(ARCH)/capahtml: capaHTML.c $(ARCH)/libcapa$(VER).a
105: $(CC) $(CFLAG) -o $@ $< $(ARCH)/libcapa$(VER).a $(P_FLAGS)
1.1 albertel 106:
1.6 albertel 107: capahtml: $(ARCH)/capahtml
108: true
109:
110: $(ARCH)/capasbin: capaHTML.c $(ARCH)/libcapa$(VER).a
111: $(CC) $(CFLAG) -o $@ $< -DCAPA_WEB $(ARCH)/libcapa$(VER).a $(P_FLAGS)
112:
113: capasbin: $(ARCH)/capasbin
114: true
115:
116: $(ARCH)/allcapaid: allcapaid.c $(ARCH)/libcapa$(VER).a
117: $(CC) $(CFLAG) -o $@ $< $(ARCH)/libcapa$(VER).a $(P_FLAGS)
118:
119: allcapaid: $(ARCH)/allcapaid
120: true
121:
122: $(ARCH)/qzparse: qzparse.c $(ARCH)/libcapa$(VER).a
123: $(CC) $(CFLAG) -o $@ $< $(ARCH)/libcapa$(VER).a $(P_FLAGS)
124:
125: qzparse: $(ARCH)/qzparse
126: true
127:
128: $(ARCH)/libcapa$(VER).a: $(ARCH_OBJ) $(PAR_SRC)
129: $(AR) r $(ARCH)/libcapa$(VER).a $(ARCH_OBJ)
1.1 albertel 130:
131: binclean:
132: $(RM) $(ARCH)/*.o $(ARCH)/*.a
133:
1.7 albertel 134: $(ARCH)/%.o: %.c capaToken.h
1.6 albertel 135: $(CC) $(CFLAG) -c $< -o $@ $(DEF)
136:
137: $(ARCH)/tthfunc.o: $(TTH_SRC)
138: $(CC) $(CFLAG) -c $< -o $@ $(DEF)
139:
140: $(ARCH)/convert: $(ARCH)libcapa($VER).a $(ARCH)/convert.o
141: $(CC) $(CFLAG) $(DEF) -o $@ $(ARCH)/convert.o -L$(ARCH) -lcapa$(VER) $(P_FLAGS)
142:
1.7 albertel 143: capaToken.h: capaGrammarDef.y
1.8 ! albertel 144: $(YACC) -d $< --output=capaParserFun.c
1.7 albertel 145: mv capaParserFun.h capaToken.h
146:
147: capaForumla.h: capaFormula.y
148: $(YACC) -d $< -p fml_ --output=$@
149: mv capaFormulaParser.h capaFormula.h
1.1 albertel 150:
1.6 albertel 151: capaParserFun.c: capaGrammarDef.y
152: $(YACC) -d $< --output=$@
153: mv capaParserFun.h capaToken.h
1.1 albertel 154:
1.6 albertel 155: capaLexerFun.c: capaLexerDef.flex capaToken.h
156: $(LEX) -o$@ $<
1.1 albertel 157:
1.6 albertel 158: capaFormulaParser.c: capaFormula.y
159: $(YACC) -d $< -p fml_ --output=$@
1.7 albertel 160: mv capaFormulaParser.h capaFormula.h
1.1 albertel 161:
1.6 albertel 162: clean:
163: rm -f $(ARCH)/*.o
164: rm -f $(ARCH)/libcapa$(VER).a
1.7 albertel 165: rm -f capaToken.h capaParserFun.c capaLexerFun.c capaFormula.h \
166: capaFormulaParser.c
1.1 albertel 167:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>