Annotation of capa/capa51/GUITools/Makefile, revision 1.8
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
! 5: # modify it under the terms of the GNU Library General Public License as
! 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
! 12: # Library General Public License for more details.
! 13: #
! 14: # You should have received a copy of the GNU Library General Public
! 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.7 albertel 29: QUIZZERMINORVER=\"1\"
30: GRADERMINORVER=\"1\"
31: MANAGERMINORVER=\"1\"
32: WEBPAGEMINORVER=\"1\"
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.1 albertel 57: INC=-I. -I$(TCLTK)/include
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)
66: INC=-I. -I/usr/local/include
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)
82: INC=-I. -I$(TCLTK)/include -I/usr/openwin/include
83: TCLSH=$(TCLTK)/bin/tclsh8.0
84:
85: else
86: ifeq ($(UNAME),IRIX)
87:
88: CC=cc
89: ARCHCOPT=-O3 $(DEFS)
90: INC=-I. -I/usr/people/capa/include
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)
103: CAPALIB=Capa/$(UNAME)/libcapa5.1.a
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:
119: all: $(UNAME)/quizzer $(UNAME)/grader $(UNAME)/manager $(UNAME)/webpage $(UNAME)/answers
120:
121: dmalloc:
122: $(MAKE) $(UNAME)/quizzer DBUGDEF="-DDMALLOC -DDMALLOC_FUNC_CHECK" DBUGLIB="-ldmalloc"
123:
124: all.2: $(UNAME)/quizzer.2 $(UNAME)/grader.2 $(UNAME)/manager.2 $(UNAME)/webpage.2 $(UNAME)/answers
125:
126: $(UNAME)/answers: $(UNAME)/answers.o
1.6 albertel 127: $(CC) $(COPT) -o $@ $< $(LIBPATH) $(CAPALIB) $(DBUGLIB) -lm -lfl
1.1 albertel 128:
129: $(UNAME)/quizzer: $(QUIZZEROBJ)
130: $(CC) $(COPT) -o $@ $(QUIZZEROBJ) $(LIBPATH) $(LIB)
131:
132: $(UNAME)/quizzer.2: $(QUIZZEROBJ2)
133: $(CC) $(COPT) -o $@ $(QUIZZEROBJ2) $(LIBPATH) $(LIB)
134:
135: $(UNAME)/grader: $(GRADEROBJ)
136: $(CC) $(COPT) -o $@ $(GRADEROBJ) $(LIBPATH) $(LIB)
137:
138: $(UNAME)/grader.2: $(GRADEROBJ2)
139: $(CC) $(COPT) -o $@ $(GRADEROBJ2) $(LIBPATH) $(LIB)
140:
141: $(UNAME)/manager: $(MANAGEROBJ)
142: $(CC) $(COPT) -o $@ $(MANAGEROBJ) $(LIBPATH) $(LIB)
143:
144: $(UNAME)/manager.2: $(MANAGEROBJ2)
145: $(CC) $(COPT) -o $@ $(MANAGEROBJ2) $(LIBPATH) $(LIB)
146:
147: $(UNAME)/webpage: $(WEBPAGEOBJ)
148: $(CC) $(COPT) -o $@ $(WEBPAGEOBJ) $(LIBPATH) $(LIBTCL)
149:
150: $(UNAME)/webpage.2: $(WEBPAGEOBJ2)
151: $(CC) $(COPT) -o $@ $(WEBPAGEOBJ2) $(LIBPATH) $(LIBTCL)
152:
153: $(UNAME)/%.tcl.o: %.tcl.c
154: $(CC) $(COPT) $(INC) -c $< -o $@
155:
156: quizzer.tcl.c: quizzer.tcl $(UNAME)/tcl2c-qz common.tcl utils.tcl quizzer.templates.tcl
157: ./$(UNAME)/tcl2c-qz -qz -o $@ common.tcl utils.tcl quizzer.templates.tcl $<
158:
1.2 albertel 159: grader.tcl.c: grader.tcl $(UNAME)/tcl2c-qz common.tcl utils.tcl gradesubjective.tcl
1.1 albertel 160: ./$(UNAME)/tcl2c-qz -gd -o $@ common.tcl utils.tcl $<
161:
162: manager.tcl.c: manager.tcl $(UNAME)/tcl2c-qz common.tcl utils.tcl \
1.5 albertel 163: scorer.tcl classl.tcl capastats.tcl seating.tcl groupemail.tcl
1.1 albertel 164: ./$(UNAME)/tcl2c-qz -mn -o $@ common.tcl utils.tcl \
165: $< scorer.tcl classl.tcl capastats.tcl \
166: seating.tcl
167:
168: webpage.tcl.c: webpage.tcl $(UNAME)/tcl2c-qz
169: ./$(UNAME)/tcl2c-qz -wb -o $@ $<
170:
171: $(UNAME)/tcl2c-qz:
172: $(CC) $(COPT) $(INC) -o $@ tcl2c-qz.c $(LIBPATH) $(LIB)
173:
174: clean:
175: rm -f $(UNAME)/*.o *[~#] $(UNAME)/quizzer $(UNAME)/quizzer.2 quizzer.tcl.c \
176: $(UNAME)/grader $(UNAME)/grader.2 grader.tcl.c \
177: $(UNAME)/manager $(UNAME)/manager.2 manager.tcl.c \
178: $(UNAME)/webpage webpage.tcl.c \
179: $(UNAME)/answers $(UNAME)/tcl2c-qz
180:
181: managerclean:
182: rm -f $(UNAME)/*.o *[~#] $(UNAME)/manager $(UNAME)/manager.2 manager.tcl.c
183:
184: graderclean:
185: rm -f $(UNAME)/*.o *[~#] $(UNAME)/grader $(UNAME)/grader.2 grader.tcl.c
186:
187: quizzerclean:
188: rm -f $(UNAME)/*.o *[~#] $(UNAME)/quizzer $(UNAME)/quizzer.2 quizzer.tcl.c
189:
190: $(UNAME)/%.o: %.c
191: $(CC) $(COPT) $(INC) -c $< -o $@
192:
193:
194:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>