-
Notifications
You must be signed in to change notification settings - Fork 17
/
Makefile
45 lines (32 loc) · 1.24 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
# Unix Makefile for CheapGlk library
# This generates two files. One, of course, is libcheapglk.a -- the library
# itself. The other is Make.cheapglk; this is a snippet of Makefile code
# which locates the cheapglk library.
#
# When you install cheapglk, you must put libcheapglk.a in the lib directory,
# and glk.h, glkstart.h, and Make.cheapglk in the include directory.
#
# The file cgunigen.c was generated by the casemap.py script, but
# that step isn't in the Makefile -- you don't have to re-generate it.
# It's based on Unicode character data, which is not platform-dependent.
# Pick a C compiler.
CC = cc
#CC = gcc -ansi
OPTIONS = -g -Wall
CFLAGS = $(OPTIONS) $(INCLUDEDIRS)
GLKLIB = libcheapglk.a
CHEAPGLK_OBJS = \
cgfref.o cggestal.o cgmisc.o cgstream.o cgstyle.o cgwindow.o cgschan.o \
cgdate.o cgunicod.o main.o gi_dispa.o gi_blorb.o gi_debug.o cgblorb.o
CHEAPGLK_HEADERS = cheapglk.h gi_dispa.h gi_debug.h
all: $(GLKLIB) Make.cheapglk
cgunicod.o: cgunigen.c
$(GLKLIB): $(CHEAPGLK_OBJS)
ar r $(GLKLIB) $(CHEAPGLK_OBJS)
ranlib $(GLKLIB)
Make.cheapglk:
echo LINKLIBS = $(LIBDIRS) $(LIBS) > Make.cheapglk
echo GLKLIB = -lcheapglk >> Make.cheapglk
$(CHEAPGLK_OBJS): glk.h $(CHEAPGLK_HEADERS)
clean:
rm -f *~ *.o $(GLKLIB) Make.cheapglk