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