-
Notifications
You must be signed in to change notification settings - Fork 31
/
Makefile
executable file
·124 lines (97 loc) · 2.57 KB
/
Makefile
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
#!/bin/make
#
# 2005 makefile
#
# Copyright (C) 2005, Landon Curt Noll, Simon Cooper, Peter Seebach
# and Leonid A. Broukhis. All Rights Reserved. Permission for personal,
# educational or non-profit use is granted provided this copyright and
# notice are included in its entirety and remains unaltered. All other
# uses must receive prior permission from the contest judges.
# tool locations
#
SHELL= /bin/sh
CP= cp
CPP= cpp
GUNZIP= gunzip
LD= ld
MAKE= make
RM= rm
SED= sed
TAR= tar
TRUE= true
# Set X11_LIBDIR to the directory where the X11 library resides
#
X11_LIBDIR= /usr/X11R6/lib
# Set X11_INCLUDEDIR to the directory where the X11 include files reside
#
X11_INCLUDEDIR= /usr/X11R6/include
# optimization
#
# Most compiles will safely use -O2. Some can use only -O1 or -O.
# A few compilers have broken optimizers and thus you may
# not want anything.
#
#OPT=
#OPT= -O
#OPT= -O1
OPT= -O2
# flags for ANSI compiles
#
# NOTE: Some ANSI compilers make use of -Xa to turn on ANSI mode,
# others such as gcc may want -ansi, others (Compaq Tru64 Unix)
# want -std1, and others may want nothing at all.
# Adjust the CFLAGS line as needed.
#
# NOTE: Some compilers cannot optimize, or optimize some entries
# incorrectly. You might want to turn on -O to see if your
# compiler can handle them.
#
#
#CFLAGS= -Xa ${OPT}
#CFLAGS= -std1 $(OPT)
CFLAGS= -ansi ${OPT}
# ANSI compiler
#
# Set CC to the name of your ANSI compiler.
#
# Some entries seem to need gcc. If you have gcc, set
# both CC and MAY_NEED_GCC to gcc.
#
# If you do not have gcc, set CC to the name of your ANSI compiler, and
# set MAY_NEED_GCC to either ${CC} (and hope for the best) or to just :
# to disable such programs.
#
CC= cc
MAY_NEED_GCC= gcc
# 2005 winners
#
WINNERS= aidan anon timwi boutines chia giljade jetro klausler mikeash mynx persano sykes toledo vik vince
# default build
#
build:
for i in ${WINNERS} ; do (cd $$i; ${MAKE} "CC=${CC}" "CFLAGS=${CFLAGS}" "X11_LIBDIR=${X11_LIBDIR}" "X11_INCLUDEDIR=${X11_INCLUDEDIR}" build) done
# alternative executable
#
alt:
for i in ${WINNERS} ; do (cd $$i; ${MAKE} "CC=${CC}" "CFLAGS=${CFLAGS}" "X11_LIBDIR=${X11_LIBDIR}" "X11_INCLUDEDIR=${X11_INCLUDEDIR}" alt) done
# data files
#
data:
for i in ${WINNERS} ; do (cd $$i; ${MAKE} data) done
# utility rules
#
everything: build alt data
love:
@echo 'not war?'
haste:
$(MAKE) waste
waste:
@echo 'waste'
clean:
for i in ${WINNERS} ; do (cd $$i; ${MAKE} clean) done
clobber: ${CLOBBER}
for i in ${WINNERS} ; do (cd $$i; ${MAKE} clobber) done
nuke: clobber
@${TRUE}
install: all
@${TRUE}