File:
[LON-CAPA] /
loncom /
homework /
CAPA-converter /
Makefile
Revision
1.7:
download - view:
text,
annotated -
select for diffs
Tue Dec 4 15:17:56 2001 UTC (22 years, 9 months ago) by
albertel
Branches:
MAIN
CVS tags:
version_1_99_1_tmcc,
version_1_99_0_tmcc,
version_1_99_0,
version_1_3_X,
version_1_3_3,
version_1_3_2,
version_1_3_1,
version_1_3_0,
version_1_2_X,
version_1_2_99_1,
version_1_2_99_0,
version_1_2_1,
version_1_2_0,
version_1_1_X,
version_1_1_99_5,
version_1_1_99_4,
version_1_1_99_3,
version_1_1_99_2,
version_1_1_99_1,
version_1_1_99_0,
version_1_1_3,
version_1_1_2,
version_1_1_1,
version_1_1_0,
version_1_0_99_3,
version_1_0_99_2,
version_1_0_99_1,
version_1_0_99,
version_1_0_3,
version_1_0_2,
version_1_0_1,
version_1_0_0,
version_0_99_5,
version_0_99_4,
version_0_99_3,
version_0_99_2,
version_0_99_1,
version_0_99_0,
version_0_6_2,
version_0_6,
version_0_5_1,
version_0_5,
version_0_4,
stable_2002_spring,
stable_2002_july,
stable_2002_april,
stable_2001_fall,
conference_2003,
STABLE,
HEAD
- GPL headers
1: # The LearningOnline Network with CAPA
2: # Makefile for CAPA 5.1
3: #
4: # $Id: Makefile,v 1.7 2001/12/04 15:17:56 albertel Exp $
5: #
6: # Copyright Michigan State University Board of Trustees
7: #
8: # This file is part of the LearningOnline Network with CAPA (LON-CAPA).
9: #
10: # LON-CAPA is free software; you can redistribute it and/or modify
11: # it under the terms of the GNU General Public License as published by
12: # the Free Software Foundation; either version 2 of the License, or
13: # (at your option) any later version.
14: #
15: # LON-CAPA is distributed in the hope that it will be useful,
16: # but WITHOUT ANY WARRANTY; without even the implied warranty of
17: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18: # GNU General Public License for more details.
19: #
20: # You should have received a copy of the GNU General Public License
21: # along with LON-CAPA; if not, write to the Free Software
22: # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23: #
24: # /home/httpd/html/adm/gpl.txt
25: #
26: # http://www.lon-capa.org/
27: #
28:
29: VER = 5.1
30: BUGFIX = 0
31: #CC = i486-linuxlibc1-gcc -DCAPA_VER=\"$(VER).$(BUGFIX)\" -DCOMPILE_DATE=\"`date +'%b-%d-%Y'`\"
32: CC = cc -DCAPA_VER=\"$(VER).$(BUGFIX)\" -DCOMPILE_DATE=\"`date +'%b-%d-%Y-%H:%M'`\"
33: DEF = -DUSE_DYNAMIC_SYMBOLS -D_GNU_SOURCE#-DLEX_DBUG
34: CFLAG = -g -Wall
35: LEX = flex -Cfa -s
36: YACC = bison
37: AR = ar
38: MV = mv
39: RM = rm
40: STRIP = echo
41: #STRIP = strip
42: LEXFLAG = -v
43:
44: # OSF1, SunOS, Linux, NEXTSTEP, HP-UX, IRIX
45:
46: ARCH = $(shell uname)
47: Linux = /usr/lib/libncurses.a
48:
49: P_FLAGS = -ll -lm
50:
51: S_FLAGS = $($(ARCH)) $(P_FLAGS)
52:
53: OSF1FLAG = -O3 -Olimit 2048
54:
55: #ARCH = $(shell uname)
56: # Architecture speicifc subdirectory
57: # output from uname command
58: #
59: # Architectural note:
60: # on NeXT compiling libcapa after the final step,
61: # ranlib libcapa4.5.a
62: #
63: # HP-UX
64: # alloca() could not linked by ld
65: # file capaParserFun.c contains alloca definition
66: # add <stdlib.h> and <alloca.h> after __hpux
67: # gmake is not available on HP-UX DECS
68:
69: PAR_SRC = capaCommon.c capaFunction.c capaParserFun.c capaLexerFun.c
70:
71: PAR_OBJ = $(PAR_SRC:.c=.o)
72:
73: ARCH_OBJ = $(ARCH)/capaCommon.o $(ARCH)/capaLexerFun.o \
74: $(ARCH)/capaParserFun.o
75: ## ===================================================================
76:
77: # conditional macros in alpha
78: #
79: # libcapa:=MACRO=string
80:
81:
82: convert: $(ARCH) $(ARCH)/convert
83: true
84:
85: all: $(ARCH) $(ARCH)libcapa($VER).a $(ARCH)/convert
86:
87: $(ARCH):
88: mkdir $(ARCH)
89:
90: dmalloc:
91: $(MAKE) DEF="-DDMALLOC -DDMALLOC_FUNC_CHECK $(DEF)" P_FLAGS="-ldmalloc $(P_FLAGS)" libcapa convert
92:
93: $(ARCH)/libcapa$(VER).a: $(ARCH_OBJ)
94: $(AR) r $(ARCH)/libcapa$(VER).a $(ARCH_OBJ)
95:
96: binclean:
97: $(RM) $(ARCH)/*.o $(ARCH)/*.a
98:
99: $(ARCH)/%.o: %.c capaCommon.h capaToken.h Makefile
100: $(CC) $(CFLAG) -c $< -o $@ $(DEF)
101:
102: $(ARCH)/convert: $(ARCH)/libcapa$(VER).a $(ARCH)/convert.o
103: $(CC) $(CFLAG) $(DEF) -o $@ $(ARCH)/convert.o -L$(ARCH) -lcapa$(VER) $(P_FLAGS)
104:
105: capaToken.h: capaParserFun.c
106:
107: capaParserFun.c: capaGrammarDef.y
108: $(YACC) -d $< --output=$@
109: mv capaParserFun.h capaToken.h
110:
111: capaLexerFun.c: capaLexerDef.flex capaToken.h
112: $(LEX) -o$@ $<
113:
114: clean:
115: rm -f $(ARCH)/*.o
116: rm -f $(ARCH)/libcapa$(VER).a
117: rm -f capaToken.h
118: rm -f capaParserFun.c
119: rm -f capaLexerFun.c
120:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>