Annotation of capa/capa51/pProj/Makefile, revision 1.1.1.1
1.1 albertel 1: # ==================================================================
2: # Makefile for CAPA 5.1
3: # ==================================================================
4:
5: VER = 5.1
6: BUGFIX = 0
7: #CC = i486-linuxlibc1-gcc -DCAPA_VER=\"$(VER).$(BUGFIX)\" -DCOMPILE_DATE=\"`date +'%b-%d-%Y'`\"
8: CC = cc -DCAPA_VER=\"$(VER).$(BUGFIX)\" -DCOMPILE_DATE=\"`date +'%b-%d-%Y'`\"
9: CFLAG = -g -Wall
10: DEF = -DUSE_DYNAMIC_SYMBOLS
11: LEX = flex
12: YACC = bison
13: AR = ar
14: MV = mv
15: RM = rm
16: STRIP = echo
17: #STRIP = strip
18: LEXFLAG = -v
19:
20: # OSF1, SunOS, Linux, NEXTSTEP, HP-UX, IRIX
21:
22: ARCH = $(shell uname)
23: OSF1 = -lcurses #-ltermcap
24: SunOS = /home/capa/source/lib/libncurses.a
25: Linux = /usr/lib/libncurses.a
26: NEXTSTEP = -lcurses -ltermcap
27: HP-UX = -lcurses -ltermcap
28: IRIX = -lcurses -ltermcap
29: FreeBSD = -lncurses -ltermcap
30:
31: P_FLAGS = -lfl -lm
32:
33: S_FLAGS = $($(ARCH)) $(P_FLAGS)
34:
35: OSF1FLAG = -O3 -Olimit 2048
36:
37: #ARCH = $(shell uname)
38: # Architecture speicifc subdirectory
39: # output from uname command
40: #
41: # Architectural note:
42: # on NeXT compiling libcapa after the final step,
43: # ranlib libcapa4.5.a
44: #
45: # HP-UX
46: # alloca() could not linked by ld
47: # file capaParserFun.c contains alloca definition
48: # add <stdlib.h> and <alloca.h> after __hpux
49: # gmake is not available on HP-UX DECS
50:
51: PAR_SRC = capaCommon.c capaLexerFun.c \
52: capaParserFun.c capaFunction.c capaParserUtils.c \
53: capaMapExpr.c capaUnit.c com.c linpack.c ranlib.c \
54: capaCgiUtils.c capaSubjective.c capaRQO.c capaFormulaLexer.c capaFormulaParser.c
55:
56: UNIT_SRC = capaUnit.c
57:
58:
59: P_SRC_DIST = pProj/Makefile \
60: pProj/capaCommon.c pProj/capaLexerFun.c \
61: pProj/capaParserFun.c pProj/capaFunction.c \
62: pProj/capaMapExpr.c \
63: pProj/com.c pProj/linpack.c \
64: pProj/ranlib.c \
65: pProj/capaCommon.h pProj/capaFunction.h \
66: pProj/capaParser.h pProj/capaToken.h \
67: pProj/ranlib.h pProj/lex_debug.h \
68: pProj/allcapaid.c pProj/capalogin.c \
69: pProj/qztotex.c pProj/capaUnit.c \
70: pProj/qzparse.c pProj/capaCgiUtils.c \
71: pProj/capaCGI.h pProj/capaHTML.c \
72: pProj/capaSubjective.c pProj/capaFormula.h \
73: pProj/capaFormulaLexer.c pProj/capaFormulaParser.c pProj/capaParserUtils.c
74:
75: BIN_DIST = pProj/$(ARCH)/capalogin pProj/$(ARCH)/qztotex pProj/$(ARCH)/allcapaid pProj/$(ARCH)/qzparse #pProj/$(ARCH)/setdbheader
76: BIN_DIST_NOPATH = capalogin allcapaid qzparse capahtml capasbin
77:
78: PAR_OBJ = $(PAR_SRC:.c=.o)
79:
80: UNIT_OBJ = $(UNIT_SRC:.c=.o)
81:
82: ARCH_OBJ = $(ARCH)/capaCommon.o $(ARCH)/capaLexerFun.o \
83: $(ARCH)/capaParserFun.o $(ARCH)/capaFunction.o \
84: $(ARCH)/capaUnit.o \
85: $(ARCH)/capaCgiUtils.o $(ARCH)/capaSubjective.o \
86: $(ARCH)/capaMapExpr.o $(ARCH)/com.o \
87: $(ARCH)/linpack.o $(ARCH)/ranlib.o $(ARCH)/capaRQO.o \
88: $(ARCH)/capaFormulaLexer.o $(ARCH)/capaFormulaParser.o $(ARCH)/capaParserUtils.o
89:
90: ## ===================================================================
91:
92: # conditional macros in alpha
93: #
94: # libcapa:=MACRO=string
95:
96:
97: all: libcapa capalogin capahtml capasbin allcapaid qzparse
98:
99: dmalloc:
100: $(MAKE) DEF="-DDMALLOC -DDMALLOC_FUNC_CHECK $(DEF)" P_FLAGS="-ldmalloc $(P_FLAGS)" libcapa capasbin #qzparse
101:
102: libcapa:
103: $(MAKE) objdir
104: $(MAKE) allobj
105: if test -f $(ARCH)/libcapa$(VER).a ; then $(RM) $(ARCH)/libcapa$(VER).a ; fi
106: (cd $(ARCH); $(AR) q libcapa$(VER).a $(PAR_OBJ) )
107: if test $(ARCH) = "NEXTSTEP" ; then \
108: (cd $(ARCH); ranlib libcapa$(VER).a ) ; fi
109:
110:
111: binclean:
112: $(RM) $(ARCH)/*.o $(ARCH)/*.a
113:
114:
115: package:
116: @(cd $(ARCH);tar cvvf ../capabin.`uname`.$(VER).tar $(BIN_DIST_NOPATH) )
117:
118:
119: dist: libcapa capalogin qztotex allcapaid
120: @(cd $(ARCH);tar cvvf ../../parser.bin.`uname`.$(VER).tar $(BIN_DIST_NOPATH) )
121:
122:
123: capadist: libcapa capalogin qztotex allcapaid
124: @(cd $(ARCH);tar uvvf ../../capa.bin.`uname`.$(CAPA_VER).tar $(BIN_DIST_NOPATH) )
125:
126:
127: srcdist:
128: @(cd ..;tar cvvf parser.src.$(VER).tar $(P_SRC_DIST) )
129:
130:
131: capasrcdist:
132: @(cd ..;tar uvvf capa.src.$(CAPA_VER).tar $(P_SRC_DIST) )
133:
134: # ----------------------------------------------------------------
135:
136: objdir:
137: -@ [ -d $(ARCH) ] || ( mkdir $(ARCH); chmod 755 $(ARCH) )
138:
139: allobj:
140: ( ofile="" ; \
141: cfile="" ; \
142: prefix="" ; \
143: CCFLAG="$(CFLAG) $(DEF)";\
144: if test $(ARCH) = "AIX" ; then CCFLAG="-O3 -DAIX $(DEF)"; fi;\
145: if test $(ARCH) = "OSF1" ; then CCFLAG="$(OSF1FLAG) $(DEF)"; fi;\
146: if test $(ARCH) = "NEXTSTEP" ; then CCFLAG="-arch i386 -arch m68k $(DEF)"; fi;\
147: if test $(ARCH) = "SunOS" ; then CCFLAG="-xO3 $(DEF)"; fi;\
148: if test $(ARCH) = "HP-UX" ; then CCFLAG="-O -Ae -Dhpux $(DEF)"; fi;\
149: if test $(ARCH) = "IRIX" ; then CCFLAG="-O2 -DIRIX $(DEF)"; fi;\
150: for prefix in $(PAR_SRC:.c=) out ; do \
151: if [ $${prefix} = "out" ] ; then break; fi ; \
152: cfile="$$prefix.c" ; \
153: ofile="./$(ARCH)/$$prefix.o" ; \
154: cmd="$(CC) $$CCFLAG -c $$cfile -o $$ofile"; \
155: echo $$cmd ; \
156: $$cmd ; \
157: done )
158:
159: .c.o:
160: echo "TARGET:"$@
161: echo "DEPEND:"$<
162:
163: capalogin :
164: (CCFLAG="$(CFLAG) $(DEF)";\
165: if test $(ARCH) = "AIX" ; then CCFLAG="-O3 -DAIX $(DEF)"; fi;\
166: if test $(ARCH) = "OSF1" ; then CCFLAG="$(OSF1FLAG) $(DEF)"; fi;\
167: if test $(ARCH) = "SunOS" ; then CCFLAG="-xO3 $(DEF)"; fi;\
168: if test $(ARCH) = "HP-UX" ; then CCFLAG="-O -Ae -Dhpux $(DEF)"; fi;\
169: if test $(ARCH) = "NEXTSTEP" ; then CCFLAG="-arch i386 -arch m68k $(DEF)"; fi;\
170: if test $(ARCH) = "IRIX" ; then CCFLAG="-O2 -DIRIX $(DEF)"; fi;\
171: CMD="$(CC) $$CCFLAG -o $(ARCH)/$@ $@.c -L$(ARCH) -lcapa$(VER) $(S_FLAGS)"; \
172: echo $$CMD ;\
173: $$CMD )
174: $(STRIP) $(ARCH)/$@
175:
176: allcapaid qzparse:
177: (CCFLAG="$(CFLAG) $(DEF)";\
178: if test $(ARCH) = "AIX" ; then CCFLAG="-O3 -DAIX $(DEF)"; fi;\
179: if test $(ARCH) = "OSF1" ; then CCFLAG="$(OSF1FLAG) $(DEF)"; fi;\
180: if test $(ARCH) = "SunOS" ; then CCFLAG="-xO3 $(DEF)"; fi;\
181: if test $(ARCH) = "HP-UX" ; then CCFLAG="-O -Ae -Dhpux $(DEF)"; fi;\
182: if test $(ARCH) = "NEXTSTEP" ; then CCFLAG="-arch i386 -arch m68k $(DEF)"; fi;\
183: if test $(ARCH) = "IRIX" ; then CCFLAG="-O2 -DIRIX $(DEF)"; fi;\
184: CMD="$(CC) $$CCFLAG -o $(ARCH)/$@ $@.c -L$(ARCH) -lcapa$(VER) $(P_FLAGS)"; \
185: echo $$CMD ;\
186: $$CMD )
187: $(STRIP) $(ARCH)/$@
188:
189: capahtml capasbin:
190: (CCFLAG="$(CFLAG) $(DEF)";\
191: if test $(ARCH) = "AIX" ; then CCFLAG="-O3 -DAIX $(DEF)"; fi;\
192: if test $(ARCH) = "OSF1" ; then CCFLAG="$(OSF1FLAG) $(DEF)"; fi;\
193: if test $(ARCH) = "SunOS" ; then CCFLAG="-xO3 $(DEF)"; fi;\
194: if test $(ARCH) = "HP-UX" ; then CCFLAG="-O -Ae -Dhpux $(DEF)"; fi;\
195: if test $(ARCH) = "NEXTSTEP" ; then CCFLAG="-arch i386 -arch m68k $(DEF)"; fi;\
196: if test $(ARCH) = "IRIX" ; then CCFLAG="-O2 -DIRIX $(DEF)"; fi;\
197: if test $@ = capasbin ; then WDEFS="-DCAPA_WEB" ; fi; \
198: CMD="$(CC) $$CCFLAG -o $(ARCH)/$@ capaHTML.c $$WDEFS -L$(ARCH) -lcapa$(VER) $(P_FLAGS)"; \
199: echo $$CMD ;\
200: $$CMD )
201: $(STRIP) $(ARCH)/$@
202:
203:
204: cleanup:
205: $(RM) -f *.o
206:
207: tags:
208: etags *.[ch]
209:
210: depend:
211: makedepend -- $(CFLAG) -- *.[ch]
212:
213:
214: # ||<===================================================================>||
215: ## =========================================================================
216: # /usr/ccs/lib/liby.a(libmai.o) has a main,
217: # /usr/ucblib/libcurses should come before .c file.
218: ## =========================================================================
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>