Annotation of capa/capa51/GUITools/Makefile, revision 1.12
1.1 albertel 1: # Makefile for quizzer and grader and manager
1.8 albertel 2: # Copyright (C) 1992-2000 Michigan State University
3: #
4: # The CAPA system is free software; you can redistribute it and/or
1.11 albertel 5: # modify it under the terms of the GNU General Public License as
1.8 albertel 6: # published by the Free Software Foundation; either version 2 of the
7: # License, or (at your option) any later version.
8: #
9: # The CAPA system is distributed in the hope that it will be useful,
10: # but WITHOUT ANY WARRANTY; without even the implied warranty of
11: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1.11 albertel 12: # General Public License for more details.
1.8 albertel 13: #
1.11 albertel 14: # You should have received a copy of the GNU General Public
1.8 albertel 15: # License along with the CAPA system; see the file COPYING. If not,
16: # write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17: # Boston, MA 02111-1307, USA.
18: #
19: # As a special exception, you have permission to link this program
20: # with the TtH/TtM library and distribute executables, as long as you
21: # follow the requirements of the GNU GPL in regard to all of the
22: # software in the executable aside from TtH/TtM.
23:
24: # Guy Albertelli II 1998
1.1 albertel 25: # The target all creates TCL/TK dependent programs.
26: # The target all.2 creates stand alone programs.
27:
28: MAJORVER=\"5.1\"
1.12 ! albertel 29: QUIZZERMINORVER=\"3\"
! 30: GRADERMINORVER=\"3\"
! 31: MANAGERMINORVER=\"3\"
! 32: WEBPAGEMINORVER=\"3\"
1.1 albertel 33: UNAME=$(shell uname)
34:
35: QUIZZERDEFS=-DQUIZZERMINORVER=$(QUIZZERMINORVER)
36: GRADERDEFS=-DGRADERMINORVER=$(GRADERMINORVER)
37: MANAGERDEFS=-DMANAGERMINORVER=$(MANAGERMINORVER)
38: WEBPAGEDEFS=-DWEBPAGEMINORVER=$(WEBPAGEMINORVER)
39: DEFS=$(QUIZZERDEFS) $(GRADERDEFS) $(MANAGERDEFS) $(WEBPAGEDEFS) \
40: -DMAJORVER=$(MAJORVER) -DARCHSTR=\"$(UNAME)\" \
41: -DCOMPILE_DATE=\"`date +'%b-%d-%Y'`\"
42:
43: ifeq ($(UNAME),Linux)
44:
45: #CC=i486-linuxlibc1-gcc
46: #TCLTK=/home/albertel/tcltk/lib5/
47: #ARCHLIB= $(TCLTK)/lib/libtk8.0.a $(TCLTK)/lib/libtcl8.0.a /usr/lib/libl.a $(LIBPATH) /usr/i486-linuxlibc1/lib/libX11.a /usr/lib/libdl.a /usr/lib/libm.a /usr/lib/libc.a
48: LIBPATH=-L/usr/lib/libc_debug/
49: CC=gcc
50: TCLTK=/home/albertel/tcltk/egcc
51: #TCLTK=/nfs/mileva/tcltk/egcc
1.6 albertel 52: #TCLTK=/mnt2/tcltk/egcc
53: ARCHLIB=-lfl $(TCLTK)/lib/libtk8.0.a $(TCLTK)/lib/libtcl8.0.a -lm $(LIBPATH) -lX11 -ldl
54: ARCHLIBTCL=-lfl $(TCLTK)/lib/libtcl8.0.a -lm $(LIBPATH) -ldl
1.1 albertel 55: LIBPATH=-L/usr/X11R6/lib/
1.4 albertel 56: ARCHCOPT=-g -Wall $(DEFS)
1.10 albertel 57: INC=-I. -I.. -I$(TCLTK)/include
1.1 albertel 58: TCLSH=$(TCLTK)/bin/tclsh8.0
59:
60: else
61: ifeq ($(UNAME),OSF1)
62:
63: CC=cc
64: ARCHCOPT=-O3 -Olimit 768 $(DEFS)
65: #ARCHCOPT=-g $(DEFS)
1.10 albertel 66: INC=-I. -I.. -I/usr/local/include
1.1 albertel 67: ARCHLIB=-ly -ll -lm -lX11 \
68: /usr/local/lib/libtk8.0.a /usr/local/lib/libtcl8.0.a
69: ARCHLIBTCL=-ll /usr/local/lib/libtcl8.0.a -lm $(LIBPATH)
70: LIBPATH=-L/usr/X11/lib
71: TCLSH=tclsh8.0
72:
73: else
74: ifeq ($(UNAME),SunOS)
75:
76: CC=cc
77: TCLTK=/home/capa/source/tcl8.0/unix
78: ARCHLIB=-ldl -ly -ll -lm -lX11 -lsocket -lnsl $(TCLTK)/lib/libtk8.0.a $(TCLTK)/lib/libtcl8.0.a
79: ARCHLIBTCL=-ldl -ly -ll -lm -lsocket -lnsl $(TCLTK)/lib/libtcl8.0.a
80: LIBPATH=-L/usr/openwin/lib
81: ARCHCOPT=-xO3 $(DEFS)
1.10 albertel 82: INC=-I. -I.. -I$(TCLTK)/include -I/usr/openwin/include
1.1 albertel 83: TCLSH=$(TCLTK)/bin/tclsh8.0
84:
85: else
86: ifeq ($(UNAME),IRIX)
87:
88: CC=cc
89: ARCHCOPT=-O3 $(DEFS)
1.10 albertel 90: INC=-I. -I.. -I/usr/people/capa/include
1.1 albertel 91: ARCHLIB=-ll -ltk8.0 -ltcl8.0 -lm -lX11
92: LIBPATH=-L/usr/people/capa/lib
93: TCLSH=/usr/people/capa/bin/tclsh
94: endif
95:
96: endif
97: endif
98: endif
99:
100: LIB=$(DBUGLIB) $(ARCHLIB)
101: LIBTCL=$(DBUGLIB) $(ARCHLIBTCL)
102: COPT=$(ARCHCOPT) $(DBUGDEF)
1.10 albertel 103: CAPALIB=../pProj/$(UNAME)/libcapa5.1.a
1.1 albertel 104:
105: QUIZZEROBJ=$(UNAME)/quizzer.o $(UNAME)/quizzer.init.o $(UNAME)/common.funct.o $(UNAME)/quizzer.funct.o $(CAPALIB)
106: QUIZZEROBJ2=$(UNAME)/quizzer.init.o $(UNAME)/quizzer.tcl.o $(UNAME)/common.funct.o $(UNAME)/quizzer.funct.o $(CAPALIB)
107:
108: GRADEROBJ=$(UNAME)/grader.o $(UNAME)/grader.init.o $(UNAME)/common.funct.o $(UNAME)/grader.funct.o $(CAPALIB)
109: GRADEROBJ2=$(UNAME)/grader.init.o $(UNAME)/grader.tcl.o $(UNAME)/common.funct.o $(UNAME)/grader.funct.o $(CAPALIB)
110:
111: MANAGERGENOBJ=$(UNAME)/manager.init.o $(UNAME)/common.funct.o $(UNAME)/manager.funct.o $(UNAME)/scorer.funct.o \
112: $(UNAME)/scorer.init.o $(UNAME)/scorertoset.o $(CAPALIB)
113: MANAGEROBJ=$(UNAME)/manager.o $(MANAGERGENOBJ)
114: MANAGEROBJ2=$(UNAME)/manager.tcl.o $(MANAGERGENOBJ)
115:
116: WEBPAGEOBJ=$(UNAME)/webpage.o $(UNAME)/webpage.init.o $(UNAME)/common.funct.o $(UNAME)/webpage.funct.o $(CAPALIB)
117: WEBPAGEOBJ2=$(UNAME)/webpage.init.o $(UNAME)/webpage.tcl.o $(UNAME)/common.funct.o $(UNAME)/webpage.funct.o $(CAPALIB)
118:
1.10 albertel 119: all: $(UNAME) $(UNAME)/quizzer $(UNAME)/grader $(UNAME)/manager $(UNAME)/webpage $(UNAME)/answers
1.1 albertel 120:
121: dmalloc:
122: $(MAKE) $(UNAME)/quizzer DBUGDEF="-DDMALLOC -DDMALLOC_FUNC_CHECK" DBUGLIB="-ldmalloc"
123:
1.10 albertel 124: all.2: $(UNAME) $(UNAME)/quizzer.2 $(UNAME)/grader.2 $(UNAME)/manager.2 $(UNAME)/webpage.2 $(UNAME)/answers
125:
126: $(UNAME):
127: mkdir $(UNAME)
1.1 albertel 128:
129: $(UNAME)/answers: $(UNAME)/answers.o
1.10 albertel 130: $(CC) $(COPT) -o $@ $< $(LIBPATH) $(CAPALIB) $(DBUGLIB) -lm -ll
1.1 albertel 131:
132: $(UNAME)/quizzer: $(QUIZZEROBJ)
133: $(CC) $(COPT) -o $@ $(QUIZZEROBJ) $(LIBPATH) $(LIB)
134:
135: $(UNAME)/quizzer.2: $(QUIZZEROBJ2)
136: $(CC) $(COPT) -o $@ $(QUIZZEROBJ2) $(LIBPATH) $(LIB)
137:
138: $(UNAME)/grader: $(GRADEROBJ)
139: $(CC) $(COPT) -o $@ $(GRADEROBJ) $(LIBPATH) $(LIB)
140:
141: $(UNAME)/grader.2: $(GRADEROBJ2)
142: $(CC) $(COPT) -o $@ $(GRADEROBJ2) $(LIBPATH) $(LIB)
143:
144: $(UNAME)/manager: $(MANAGEROBJ)
145: $(CC) $(COPT) -o $@ $(MANAGEROBJ) $(LIBPATH) $(LIB)
146:
147: $(UNAME)/manager.2: $(MANAGEROBJ2)
148: $(CC) $(COPT) -o $@ $(MANAGEROBJ2) $(LIBPATH) $(LIB)
149:
150: $(UNAME)/webpage: $(WEBPAGEOBJ)
151: $(CC) $(COPT) -o $@ $(WEBPAGEOBJ) $(LIBPATH) $(LIBTCL)
152:
153: $(UNAME)/webpage.2: $(WEBPAGEOBJ2)
154: $(CC) $(COPT) -o $@ $(WEBPAGEOBJ2) $(LIBPATH) $(LIBTCL)
155:
156: $(UNAME)/%.tcl.o: %.tcl.c
157: $(CC) $(COPT) $(INC) -c $< -o $@
158:
159: quizzer.tcl.c: quizzer.tcl $(UNAME)/tcl2c-qz common.tcl utils.tcl quizzer.templates.tcl
160: ./$(UNAME)/tcl2c-qz -qz -o $@ common.tcl utils.tcl quizzer.templates.tcl $<
161:
1.2 albertel 162: grader.tcl.c: grader.tcl $(UNAME)/tcl2c-qz common.tcl utils.tcl gradesubjective.tcl
1.1 albertel 163: ./$(UNAME)/tcl2c-qz -gd -o $@ common.tcl utils.tcl $<
164:
165: manager.tcl.c: manager.tcl $(UNAME)/tcl2c-qz common.tcl utils.tcl \
1.5 albertel 166: scorer.tcl classl.tcl capastats.tcl seating.tcl groupemail.tcl
1.1 albertel 167: ./$(UNAME)/tcl2c-qz -mn -o $@ common.tcl utils.tcl \
168: $< scorer.tcl classl.tcl capastats.tcl \
169: seating.tcl
170:
171: webpage.tcl.c: webpage.tcl $(UNAME)/tcl2c-qz
172: ./$(UNAME)/tcl2c-qz -wb -o $@ $<
173:
174: $(UNAME)/tcl2c-qz:
175: $(CC) $(COPT) $(INC) -o $@ tcl2c-qz.c $(LIBPATH) $(LIB)
176:
177: clean:
178: rm -f $(UNAME)/*.o *[~#] $(UNAME)/quizzer $(UNAME)/quizzer.2 quizzer.tcl.c \
179: $(UNAME)/grader $(UNAME)/grader.2 grader.tcl.c \
180: $(UNAME)/manager $(UNAME)/manager.2 manager.tcl.c \
181: $(UNAME)/webpage webpage.tcl.c \
182: $(UNAME)/answers $(UNAME)/tcl2c-qz
183:
184: managerclean:
185: rm -f $(UNAME)/*.o *[~#] $(UNAME)/manager $(UNAME)/manager.2 manager.tcl.c
186:
187: graderclean:
188: rm -f $(UNAME)/*.o *[~#] $(UNAME)/grader $(UNAME)/grader.2 grader.tcl.c
189:
190: quizzerclean:
191: rm -f $(UNAME)/*.o *[~#] $(UNAME)/quizzer $(UNAME)/quizzer.2 quizzer.tcl.c
192:
193: $(UNAME)/%.o: %.c
194: $(CC) $(COPT) $(INC) -c $< -o $@
195:
196:
197:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>