-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile.brunel
78 lines (59 loc) · 2.31 KB
/
Makefile.brunel
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# (c) 1993 Roger Binns
#
# These tools were produced by Roger Binns for a fourth year project as part of
# a computer science degree, for the Computer Science department, Brunel
# University, Uxbridge, Middlesex UB8 3PH, United Kingdom.
#
# This software is provided in good faith, having been developed by Brunel
# University students as part of their normal course work. It should not be
# assumed that Brunel has any rights of ownership, and the University cannot
# accept any liability for its subsequent use. It is a condition of any such
# use that the user idemnifies the University against any claim (including
# third party claims) arising therefrom.
# This is the Makefile for building cyclo at brunel. The C++ libraries
# have not been installed with the compiler, but have been compiled by
# studentsoft, hence the long paths. If studentsoft gets dissolved
# or user support actually install the compiler properly, you should be
# able to remove the long paths.
# As of 21 June 1993, gcc-2.3.3 is the only known installed C++ compiler
# that vaguely works.
# If the Sun C header files ever beome ANSI compliant, and preferably POSIX
# compliant, you can remove the -D_BRUNEL_SUN. This is also the reason for
# the warnings generated by gcc.
HEADERS = tokens.h lib.h list.h stack.h
# Due to the bad setup of C++ at brunel, you need the following three lines
CCFLAGSMORE= -I/vol/PACK/studentsoft/src/usr/local/libg++/g++-include
LDFLAGSMORE=-L/vol/PACK/studentsoft/src/usr/local/libg++/lib
LIBSMORE=-lg++
# Compilation configuration
CC = gcc
CCPLUS = g++
LEX = flex
DEBUG = # -g
OPTIM = -O
LEXOPTS = -t
LDFLAGS = $(DEBUG) $(LDFLAGSMORE)
CFLAGS = -Wall $(OPTIM) $(DEBUG) $(DEFINES) -D_BRUNEL_SUN
LIBS = $(LIBSMORE)
all: mcstrip cyclo
mcstrip: mcstrip.c
$(CC) $(LDFLAGS) $(CFLAGS) -o mcstrip mcstrip.c
mcstrip.c: mcstrip.l
$(LEX) $(LEXOPTS) mcstrip.l > $@
cyclo: main.o scan.o lib.o
$(CCPLUS) $(LDFLAGS) $(CCFLAGSMORE) -o $@ main.o scan.o lib.o $(LIBS)
main.o: main.C $(HEADERS)
$(CCPLUS) $(CFLAGS) $(CCFLAGSMORE) -c main.C
lib.o: lib.C $(HEADERS)
$(CCPLUS) $(CFLAGS) $(CCFLAGSMORE) -c lib.C
scan.o: scan.c $(HEADERS)
$(CC) $(CFLAGS) -c scan.c
scan.c: scan.l
$(LEX) $(LEXOPTS) scan.l > $@
clean:
rm -f cyclo mcstrip core *.o *~
cleaner: clean
rm -f mcstrip.c scan.c
backup: clean
rm -f cyclo.zoo
zoo ah cyclo.zoo *