File: Makefile.in

package info (click to toggle)
tworld 1.3.0-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 6,600 kB
  • ctags: 1,403
  • sloc: ansic: 12,442; perl: 2,465; makefile: 165; sh: 9
file content (120 lines) | stat: -rw-r--r-- 2,872 bytes parent folder | download | duplicates (4)
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
#
# Useful ./configure options with respect to this Makefile:
#
# --prefix=PREFIX
# --exec_prefix=EXEC_PREFIX
# --bindir=BINDIR
# --datadir=DATADIR
# --mandir=MANDIR
# --with-sharedir=SHAREDIR

prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
datadir = @datadir@
sharedir = @sharedir@
mandir = @mandir@

CC = @CC@

CFLAGS :=@CFLAGS@ '-DROOTDIR="$(sharedir)"'
LDFLAGS :=@LDFLAGS@
LOADLIBES :=@LOADLIBES@

#
# End of configure section
#

OBJS = \
tworld.o series.o play.o encoding.o solution.o res.o lxlogic.o mslogic.o \
unslist.o help.o score.o random.o cmdline.o fileio.o err.o liboshw.a

RESOURCES = tworldres.o

#
# Binaries
#

tworld: $(OBJS)
	$(CC) $(LDFLAGS) -o $@ $^ $(LOADLIBES)

tworld.exe: $(OBJS) $(RESOURCES)
	$(CC) $(LDFLAGS) -o $@ $^ $(LOADLIBES)

mklynxcc: mklynxcc.c
	$(CC) -Wall -W -O -o $@ $^

#
# Object files
#

tworld.o   : tworld.c defs.h gen.h err.h series.h res.h play.h score.h \
             solution.h fileio.h help.h oshw.h cmdline.h ver.h
series.o   : series.c series.h defs.h gen.h err.h fileio.h solution.h
play.o     : play.c play.h defs.h gen.h err.h state.h random.h oshw.h res.h \
             logic.h solution.h fileio.h
encoding.o : encoding.c encoding.h defs.h gen.h err.h state.h
solution.o : solution.c solution.h defs.h gen.h err.h fileio.h
res.o      : res.c res.h defs.h gen.h fileio.h err.h oshw.h
lxlogic.o  : lxlogic.c logic.h defs.h gen.h err.h state.h random.h
mslogic.o  : mslogic.c logic.h defs.h gen.h err.h state.h random.h
unslist.o  : unslist.c unslist.h gen.h err.h fileio.h
help.o     : help.c help.h defs.h gen.h state.h oshw.h ver.h comptime.h
score.o    : score.c score.h defs.h gen.h err.h play.h
random.o   : random.c random.h defs.h gen.h
cmdline.o  : cmdline.c cmdline.h gen.h
fileio.o   : fileio.c fileio.h defs.h gen.h err.h
err.o      : err.c oshw.h err.h

#
# Generated files
#

comptime.h:
	echo \#define COMPILE_TIME \"`date '+%Y %b %e %T %Z'`\" > comptime.h

#
# Libraries
#

liboshw.a: oshw.h defs.h gen.h state.h err.h oshw/*.c oshw/*.h
	(cd oshw && $(MAKE))

#
# Resources
#

tworldres.o: tworld.ico
	echo SDL_app ICON $^ | windres -o $@

#
# Other
#

install: tworld
	mkdir -p $(bindir)
	mkdir -p $(sharedir)/sets
	mkdir -p $(sharedir)/data
	mkdir -p $(sharedir)/res
	mkdir -p $(mandir)/man6
	cp -i ./tworld $(bindir)/.
	cp -i sets/*.dac $(sharedir)/sets/.
	cp -i data/*.dat $(sharedir)/data/.
	cp -i res/rc $(sharedir)/res/.
	cp -i res/*.bmp $(sharedir)/res/.
	cp -i res/*.txt $(sharedir)/res/.
	cp -i res/*.wav $(sharedir)/res/.
	cp -i docs/tworld.6 $(mandir)/man6/.

all: tworld mklynxcc

clean:
	rm -f $(OBJS) tworld mklynxcc comptime.h config.*
	rm -f tworldres.o tworld.exe mklynxcc.exe
	(cd oshw && $(MAKE) clean)

spotless:
	rm -f $(OBJS) tworld mklynxcc comptime.h config.* configure
	rm -f tworldres.o tworld.exe mklynxcc.exe
	(cd oshw && $(MAKE) spotless)
	rm -f Makefile