My omnium-gatherom of scripts and source code.
1# Modify this line to indicate the default version
2
3VERSION=std
4
5# Comment this out if you don't have Tcl/Tk on your system
6
7GUIMODE=-DHAS_GUI
8
9# Modify the following line so that gcc can find the libtcl.so and
10# libtk.so libraries on your system. You may need to use the -L option
11# to tell gcc which directory to look in. Comment this out if you
12# don't have Tcl/Tk.
13
14TKLIBS=-L/usr/lib -ltk -ltcl
15
16# Modify the following line so that gcc can find the tcl.h and tk.h
17# header files on your system. Comment this out if you don't have
18# Tcl/Tk.
19
20TKINC=-isystem /usr/include/tcl8.5
21
22# Modify these two lines to choose your compiler and compile time
23# flags.
24
25CC=gcc
26CFLAGS=-Wall -O2 -fcommon
27
28##################################################
29# You shouldn't need to modify anything below here
30##################################################
31
32MISCDIR=../misc
33HCL2C=$(MISCDIR)/hcl2c
34INC=$(TKINC) -I$(MISCDIR) $(GUIMODE)
35LIBS=$(TKLIBS) -lm
36YAS=../misc/yas
37
38all: ssim
39
40# This rule builds the SEQ simulator (ssim)
41ssim: seq-$(VERSION).hcl ssim.c sim.h $(MISCDIR)/isa.c $(MISCDIR)/isa.h
42 # Building the seq-$(VERSION).hcl version of SEQ
43 $(HCL2C) -n seq-$(VERSION).hcl <seq-$(VERSION).hcl >seq-$(VERSION).c
44 $(CC) $(CFLAGS) $(INC) -o ssim \
45 seq-$(VERSION).c ssim.c $(MISCDIR)/isa.c $(LIBS)
46
47# This rule builds the SEQ+ simulator (ssim+)
48ssim+: seq+-std.hcl ssim.c sim.h $(MISCDIR)/isa.c $(MISCDIR)/isa.h
49 # Building the seq+-std.hcl version of SEQ+
50 $(HCL2C) -n seq+-std.hcl <seq+-std.hcl >seq+-std.c
51 $(CC) $(CFLAGS) $(INC) -o ssim+ \
52 seq+-std.c ssim.c $(MISCDIR)/isa.c $(LIBS)
53
54# These are implicit rules for assembling .yo files from .ys files.
55.SUFFIXES: .ys .yo
56.ys.yo:
57 $(YAS) $*.ys
58
59
60clean:
61 rm -f ssim ssim+ seq*-*.c *.o *~ *.exe *.yo *.ys
62
63
64
65