File: Makefile.in

package info (click to toggle)
cgoban 1.9.2-6
  • links: PTS
  • area: main
  • in suites: slink
  • size: 1,900 kB
  • ctags: 3,876
  • sloc: ansic: 35,809; sh: 208; makefile: 98
file content (94 lines) | stat: -rw-r--r-- 4,972 bytes parent folder | download | duplicates (3)
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
# Makefile, part of Complete Goban (game program)
# Copyright (C) 1994-1996 William Shubert
# See "configure.h.in" for more copyright information.

VERSION = @VERSION@
DATE = @DATE@

# The SYSTEM_TYPE is used to figure out where to put the object files and
#   the binary.  It's handy if you want to keep around ".o" files for,
#   let's say, both sun3 machines and sun4 machines.
SYSTEM_TYPE = @SYSTEM_TYPE@

# NOTE: This Makefile requires the following directories be created before
#   it can run:
#	obj-$(SYSTEM_TYPE)
#	obj-$(SYSTEM_TYPE)/gmp
#	obj-$(SYSTEM_TYPE)/client
#       wmslib/obj-$(SYSTEM_TYPE)
# If you run "configure", these directories should be generated automatically.
#   If, for whatever reason, this is NOT done, you should generate them by
#   hand.
# If you do create these by hand, make sure to copy "configure.h.in" into
#   your top level obj directory, rename it "configure.h", and edit it.
#   How to edit it should be self-explanatory.

# CC must be ANSI compliant.  "gcc" works well for me.
# You SHOULD NOT change "CC" here.  You should change it through the
#   environment variable "CC", then run "configure" again.  See the
#   file "README" for more information on how to do this.
CC = @CC@

# Programs used to move the binary and the man page to the proper place.
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@

# Change these values to tell make where to put the binary and the man page
#   when it's done compiling.
PREFIX = /usr/games
BINDIR = $(PREFIX)/bin
MANDIR = $(PREFIX)/man

# This should be set to the directory containing this Makefile.
BUILD_DIR = @BUILD_DIR@

INCS = @INCDIR@
LIBDIR = @LIBDIR@
LIBS = @LIBS@
OBJLIBS = @OBJLIBS@

# Various CFLAGS options.  Pick what fits your compiler.
# I try to guess what will give the best optimization, but I may be wrong.
CDEBUGOPTS = @CFLAGS@
CFLAGS = $(CDEBUGOPTS) $(INCS)
# CFLAGS = -ggdb -DDEBUG=1 -Wall -Werror -Wwrite-strings $(INCS)

LFLAGS = $(LIBDIR)
# LFLAGS = -ggdb $(LIBDIR)

OBJS = @OBJS@

cgoban-$(SYSTEM_TYPE): $(OBJS) $(OBJLIBS) wmslib/libwms-$(SYSTEM_TYPE).a
	$(CC) $(LFLAGS) -o cgoban-$(SYSTEM_TYPE) $(OBJS) $(LIBS)
	rm -f cgoban
	ln -s cgoban-$(SYSTEM_TYPE) cgoban

install:	cgoban-$(SYSTEM_TYPE) man6/cgoban.6
	$(INSTALL_PROGRAM) cgoban-$(SYSTEM_TYPE) $(BINDIR)/cgoban
	$(INSTALL_DATA) man6/cgoban.6 $(MANDIR)/man6/cgoban.6

clean:
	rm -f obj-$(SYSTEM_TYPE)/*.o obj-$(SYSTEM_TYPE)/client/*.o obj-$(SYSTEM_TYPE)/gmp/*.o
	rm -f wmslib/obj-$(SYSTEM_TYPE)/*.o

# This depend may not work for you, but you probably won't care because you'll
#   just build once.  If you do want to modify my source tree change this to
#   a depend that works for your system.  Good luck.
# This is so messy because I'm trying to do a make depend (but makedepend
#   breaks on my system for some reason) then strip out hard-coded paths to
#   the build directory, then remove all system includes that'll
#   never change anyway.  Oh yeah I also have to move the .o's that the
#   make depend emits to the proper directory.  Whew!
depend:
	sed -n 1,'/^# DO NOT DELETE/'p <Makefile-$(SYSTEM_TYPE) >Makefile-$(SYSTEM_TYPE)-temp
	rm Makefile-$(SYSTEM_TYPE)
	mv Makefile-$(SYSTEM_TYPE)-temp Makefile-$(SYSTEM_TYPE)
	$(CC) -M $(CFLAGS) src/*.c | sed -n -e 's&$(BUILD_DIR)/&&g' -e 's& /[^ ]*&&g' -e '/o *:/s&^&obj-$$(SYSTEM_TYPE)/&' -e 's&obj-$(SYSTEM_TYPE)&obj-$$(SYSTEM_TYPE)&g' -e '/[^ \\]/p' -e '/^[ ]*$$/p' >>Makefile-$(SYSTEM_TYPE)
	$(CC) -M $(CFLAGS) src/client/*.c | sed -n -e 's&$(BUILD_DIR)/&&g' -e 's& /[^ ]*&&g' -e '/o *:/s&^&obj-$$(SYSTEM_TYPE)/client/CLI&' -e 's&obj-$(SYSTEM_TYPE)&obj-$$(SYSTEM_TYPE)&g' -e '/[^ \\]/p' -e '/^[ ]*$$/p' >>$(BUILD_DIR)/Makefile-$(SYSTEM_TYPE)
	$(CC) -M $(CFLAGS) src/gmp/*.c | sed -n -e 's&$(BUILD_DIR)/&&g' -e 's& /[^ ]*&&g' -e '/o *:/s&^&obj-$$(SYSTEM_TYPE)/gmp/GMP&' -e 's&obj-$(SYSTEM_TYPE)&obj-$$(SYSTEM_TYPE)&g' -e '/[^ \\]/p' -e '/^[ ]*$$/p' >>$(BUILD_DIR)/Makefile-$(SYSTEM_TYPE)
	$(CC) -M $(CFLAGS) wmslib/src/*.c | sed -n -e 's&$(BUILD_DIR)/&&g' -e 's& /[^ ]*&&g' -e '/o *:/s&^&wmslib/obj-$$(SYSTEM_TYPE)/&' -e 's&obj-$(SYSTEM_TYPE)&obj-$$(SYSTEM_TYPE)&g' -e '/[^ \\]/p' -e '/^[ ]*$$/p' >>$(BUILD_DIR)/Makefile-$(SYSTEM_TYPE)
	$(CC) -M $(CFLAGS) wmslib/src/but/*.c | sed -n -e 's&$(BUILD_DIR)/&&g' -e 's& /[^ ]*&&g' -e '/o *:/s&^&wmslib/obj-$$(SYSTEM_TYPE)/but_&' -e 's&obj-$(SYSTEM_TYPE)&obj-$$(SYSTEM_TYPE)&g' -e '/[^ \\]/p' -e '/^[ ]*$$/p' >>$(BUILD_DIR)/Makefile-$(SYSTEM_TYPE)
	$(CC) -M $(CFLAGS) wmslib/src/abut/*.c | sed -n -e 's&$(BUILD_DIR)/&&g' -e 's& /[^ ]*&&g' -e '/o *:/s&^&wmslib/obj-$$(SYSTEM_TYPE)/abut_&' -e 's&obj-$(SYSTEM_TYPE)&obj-$$(SYSTEM_TYPE)&g' -e '/[^ \\]/p' -e '/^[ ]*$$/p' >>$(BUILD_DIR)/Makefile-$(SYSTEM_TYPE)
	$(CC) -M $(CFLAGS) wmslib/src/wms/*.c | sed -n -e 's&$(BUILD_DIR)/&&g' -e 's& /[^ ]*&&g' -e '/o *:/s&^&wmslib/obj-$$(SYSTEM_TYPE)/wms_&' -e 's&obj-$(SYSTEM_TYPE)&obj-$$(SYSTEM_TYPE)&g' -e '/[^ \\]/p' -e '/^[ ]*$$/p' >>$(BUILD_DIR)/Makefile-$(SYSTEM_TYPE)