File:
[LON-CAPA] /
loncom /
homework /
CAPA-converter /
Makefile
Revision
1.8:
download - view:
text,
annotated -
select for diffs
Thu Jun 30 15:32:29 2005 UTC (19 years, 7 months ago) by
albertel
Branches:
MAIN
CVS tags:
version_2_9_X,
version_2_9_99_0,
version_2_9_1,
version_2_9_0,
version_2_8_X,
version_2_8_99_1,
version_2_8_99_0,
version_2_8_2,
version_2_8_1,
version_2_8_0,
version_2_7_X,
version_2_7_99_1,
version_2_7_99_0,
version_2_7_1,
version_2_7_0,
version_2_6_X,
version_2_6_99_1,
version_2_6_99_0,
version_2_6_3,
version_2_6_2,
version_2_6_1,
version_2_6_0,
version_2_5_X,
version_2_5_99_1,
version_2_5_99_0,
version_2_5_2,
version_2_5_1,
version_2_5_0,
version_2_4_X,
version_2_4_99_0,
version_2_4_2,
version_2_4_1,
version_2_4_0,
version_2_3_X,
version_2_3_99_0,
version_2_3_2,
version_2_3_1,
version_2_3_0,
version_2_2_X,
version_2_2_99_1,
version_2_2_99_0,
version_2_2_2,
version_2_2_1,
version_2_2_0,
version_2_1_X,
version_2_1_99_3,
version_2_1_99_2,
version_2_1_99_1,
version_2_1_99_0,
version_2_1_3,
version_2_1_2,
version_2_1_1,
version_2_1_0,
version_2_12_X,
version_2_11_X,
version_2_11_6_msu,
version_2_11_6,
version_2_11_5_msu,
version_2_11_5,
version_2_11_4_uiuc,
version_2_11_4_msu,
version_2_11_4,
version_2_11_3_uiuc,
version_2_11_3_msu,
version_2_11_3,
version_2_11_2_uiuc,
version_2_11_2_msu,
version_2_11_2_educog,
version_2_11_2,
version_2_11_1,
version_2_11_0_RC3,
version_2_11_0_RC2,
version_2_11_0_RC1,
version_2_11_0,
version_2_10_X,
version_2_10_1,
version_2_10_0_RC2,
version_2_10_0_RC1,
version_2_10_0,
version_2_0_X,
version_2_0_99_1,
version_2_0_2,
version_2_0_1,
version_2_0_0,
version_1_99_3,
version_1_99_2,
version_1_99_1,
loncapaMITrelate_1,
language_hyphenation_merge,
language_hyphenation,
bz6209-base,
bz6209,
bz5969,
bz2851,
PRINT_INCOMPLETE_base,
PRINT_INCOMPLETE,
HEAD,
GCI_3,
GCI_2,
GCI_1,
BZ5971-printing-apage,
BZ5434-fox,
BZ4492-merge,
BZ4492-feature_horizontal_radioresponse,
BZ4492-feature_Support_horizontal_radioresponse,
BZ4492-Support_horizontal_radioresponse
- switch to inking against flex's library
1: # The LearningOnline Network with CAPA
2: # Makefile for CAPA 5.1
3: #
4: # $Id: Makefile,v 1.8 2005/06/30 15:32:29 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 = -lfl -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>