annotate GNUmakefile @ 80:2f1ecc1c5f72

Huge cleanup -- move some global variables into a struct.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 26 Sep 2011 17:39:49 +0300
parents b0f47747e625
children 51d5549a1bdc
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
1 #
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
2 # Makefile for Yadex
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
3 # Copyright © André Majorel 1998-2003.
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
4 # AYM 1998-06-10
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
5 #
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
6
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
7 # ATTENTION : GNU MAKE IS REQUIRED ! This makefile uses pattern
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
8 # rules, addprefix, addsuffix, etc. It's not named "GNUmakefile"
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
9 # for nothing.
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
10
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
11 ########################################################################
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
12 #
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
13 # Definitions that only hackers
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
14 # might want to change
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
15 #
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
16 ########################################################################
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
17
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
18 # The name of the directory where objects and
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
19 # binaries are put. I include the output of
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
20 # "uname -a" to make it easier for me to build
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
21 # Yadex for different platforms from the same
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
22 # source tree.
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
23 SYSTEM := $(shell echo `uname -n`_`uname -a | cksum` | tr -dc '[:alnum:]._-')
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
24 OBJDIR = obj/0
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
25 DOBJDIR = dobj/0
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
26 OBJPHYSDIR = obj/$(SYSTEM)
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
27 DOBJPHYSDIR = dobj/$(SYSTEM)
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
28 OBJDIR_ATCLIB = $(OBJDIR)/atclib
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
29 DOBJDIR_ATCLIB = $(DOBJDIR)/atclib
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
30 OBJPHYSDIR_ATCLIB = $(OBJPHYSDIR)/atclib
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
31 DOBJPHYSDIR_ATCLIB = $(DOBJPHYSDIR)/atclib
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
32
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
33 # Create all directories and make symlinks to
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
34 # config.cc and config.h. Doing it at the start
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
35 # makes things much simpler later on.
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
36 DUMMY := $(shell \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
37 mkdir -p $(OBJPHYSDIR) $(OBJPHYSDIR_ATCLIB); \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
38 mkdir -p $(DOBJPHYSDIR) $(DOBJPHYSDIR_ATCLIB); \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
39 [ ! -h $(OBJDIR) ] || rm $(OBJDIR); \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
40 [ ! -h $(DOBJDIR) ] || rm $(DOBJDIR); \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
41 ln -s $(SYSTEM) $(OBJDIR); \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
42 ln -s $(SYSTEM) $(DOBJDIR); \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
43 )
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
44
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
45 include $(OBJDIR)/Makefile.config
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
46
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
47 ########################################################################
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
48 #
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
49 # Definitions that end users
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
50 # might want to change
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
51 #
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
52 ########################################################################
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
53
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
54 # Which OS ?
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
55 OS := $(shell uname -s | tr A-Z a-z)
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
56
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
57 # Where your X11 libraries and headers reside.
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
58 # Current rule:
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
59 # - AIX has them in /usr/lpp/X11/{lib,include},
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
60 # - Solaris has them in /usr/openwin/{lib,include},
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
61 # - all other unices in /usr/X11R6/{lib,include}.
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
62 ifeq ($(findstring $(OS), aix), $(OS))
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
63 X11LIBDIR = /usr/lpp/X11/lib
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
64 X11INCLUDEDIR = /usr/lpp/X11/include
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
65 else
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
66 ifeq ($(findstring $(OS), solaris sunos), $(OS))
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
67 X11LIBDIR = /usr/openwin/lib
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
68 X11INCLUDEDIR = /usr/openwin/include
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
69 else
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
70 X11LIBDIR = /usr/X11R6/lib
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
71 X11INCLUDEDIR = /usr/X11R6/include
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
72 endif
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
73 endif
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
74
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
75 # $(CC) and $(CXX) are the C and C++ compiler respectively. They're
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
76 # normally autodetected by ./configure and passed to make through
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
77 # obj/0/Makefile.config.
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
78 #CC =
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
79 #CXX =
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
80
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
81 # Options used when compiling Atclib.
46
b0f47747e625 Always add debug compiler flag (-g).
Matti Hamalainen <ccr@tnsp.org>
parents: 37
diff changeset
82 CFLAGS = -g -O2 -W -Wall
0
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
83
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
84 # Options used when compiling and linking Yadex.
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
85 # ld is invoked through the C++ compiler so
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
86 # LDFLAGS should not contain options that mean
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
87 # something to the C++ compiler.
46
b0f47747e625 Always add debug compiler flag (-g).
Matti Hamalainen <ccr@tnsp.org>
parents: 37
diff changeset
88 CXXFLAGS = -g -O3 -W -Wall
0
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
89 #CXXFLAGS += -DWHITE_BACKGROUND
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
90 #LDFLAGS =
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
91
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
92 # Options used to compile and link the debugging
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
93 # targets. Not used by normal end-user targets.
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
94 # Unlike CFLAGS, CXXFLAGS and LDFLAGS, assume
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
95 # GCC/EGCS.
17
75babf13922e Optimize by default.
Matti Hamalainen <ccr@tnsp.org>
parents: 16
diff changeset
96 DCFLAGS = -g -O3
0
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
97 DCFLAGS += -Wall # GCC warnings
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
98 DCFLAGS += -pedantic # GCC warnings
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
99 DCFLAGS += -Wno-parentheses # GCC warnings
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
100 DCFLAGS += -Wpointer-arith # GCC warnings
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
101 DCFLAGS += -Wcast-qual # GCC warnings
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
102 DCFLAGS += -Wcast-align # GCC warnings
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
103 DCFLAGS += -Wwrite-strings # GCC warnings
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
104 DCFLAGS += -Wmissing-declarations # GCC warnings
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
105 DCFLAGS += -Wmissing-prototypes # GCC warnings
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
106 DCFLAGS += -Winline # GCC warnings
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
107 DCFLAGS += -pg # Profiling
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
108
17
75babf13922e Optimize by default.
Matti Hamalainen <ccr@tnsp.org>
parents: 16
diff changeset
109 DCXXFLAGS = -g -O3
0
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
110 DCXXFLAGS += -Wall # GCC warnings
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
111 DCXXFLAGS += -pedantic # GCC warnings
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
112 DCXXFLAGS += -Wno-parentheses # GCC warnings
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
113 DCXXFLAGS += -Wpointer-arith # GCC warnings
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
114 DCXXFLAGS += -Wcast-qual # GCC warnings
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
115 DCXXFLAGS += -Wcast-align # GCC warnings
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
116 DCXXFLAGS += -Wwrite-strings # GCC warnings
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
117 DCXXFLAGS += -Wmissing-declarations # GCC warnings
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
118 DCXXFLAGS += -Wmissing-prototypes # GCC warnings
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
119 #DCXXFLAGS += -Winline # GCC warnings
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
120 DCXXFLAGS += -pg # Profiling
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
121
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
122 DLDFLAGS =
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
123 DLDFLAGS += -pg # Profiling
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
124 #DLDFLAGS += -lefence # Electric Fence
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
125
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
126
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
127 ########################################################################
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
128 #
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
129 # Definitions that only hackers
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
130 # might want to change
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
131 #
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
132 ########################################################################
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
133
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
134 MAKEFILE = GNUmakefile
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
135 VERSION := $(shell cat VERSION)
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
136 VERPREV := $(shell test -f VERPREV && cat VERPREV)
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
137
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
138 # All the modules of Yadex without path or extension.
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
139 MODULES_YADEX = \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
140 acolours aym bench bitvec \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
141 cfgfile checks colour1 colour2 \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
142 colour3 colour4 config credits \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
143 dependcy dialog disppic drawmap \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
144 edisplay editgrid editlev editloop \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
145 editobj editsave endian editzoom \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
146 entry entry2 events flats \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
147 game gcolour1 gcolour2 gcolour3 \
20
07c68836db71 Remove DOS mouse code and most of the BGI crap.
Matti Hamalainen <ccr@tnsp.org>
parents: 17
diff changeset
148 geom gfx gfx3 \
0
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
149 gotoobj help1 help2 highlt \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
150 img imgscale imgspect infobar \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
151 input l_align l_centre l_flags \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
152 l_misc l_prop l_unlink l_vertices \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
153 levels lists locate lumpdir \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
154 macro memory menubar menu \
80
2f1ecc1c5f72 Huge cleanup -- move some global variables into a struct.
Matti Hamalainen <ccr@tnsp.org>
parents: 46
diff changeset
155 mkpalette names \
0
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
156 objects objinfo oldmenus palview \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
157 patchdir pic2img prefer s_centre \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
158 s_door s_lift s_linedefs s_merge \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
159 s_misc s_prop s_slice s_split \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
160 s_swapf s_vertices sanity scrnshot \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
161 selbox selectn selpath selrect \
24
b2dc19044bf3 Import simple 3D preview, an old patch by Andrew Apted. Pressing 'R' key
Matti Hamalainen <ccr@tnsp.org>
parents: 22
diff changeset
162 serialnum spritdir sticker r_render r_images \
0
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
163 t_centre t_flags t_prop t_spin \
80
2f1ecc1c5f72 Huge cleanup -- move some global variables into a struct.
Matti Hamalainen <ccr@tnsp.org>
parents: 46
diff changeset
164 textures things v_centre \
0
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
165 v_merge v_polyg vectext verbmsg \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
166 version wadfile wadlist wadnamec \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
167 wadres wads wads2 warn \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
168 windim x_centre x_exchng x_hover \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
169 x_mirror x_rotate x11 xref \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
170 yadex ytime
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
171
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
172 # All the modules of Atclib without path or extension.
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
173 MODULES_ATCLIB = \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
174 al_adigits al_aerrno al_astrerror al_fana \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
175 al_fnature al_lateol al_lcount al_lcreate \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
176 al_ldelete al_ldiscard al_lgetpos al_linsert \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
177 al_linsertl al_llength al_lpeek al_lpeekl \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
178 al_lpoke al_lpokel al_lptr al_lread \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
179 al_lreadl al_lrewind al_lseek al_lsetpos \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
180 al_lstep al_ltell al_lwrite al_lwritel \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
181 al_sapc al_saps al_scps al_scpslower \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
182 al_sdup al_sisnum al_strolc
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
183
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
184 # The source files of Yadex and Atclib
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
185 SRC_YADEX = $(addprefix src/, $(addsuffix .cc, $(MODULES_YADEX)))
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
186 SRC_ATCLIB = $(addprefix atclib/, $(addsuffix .c, $(MODULES_ATCLIB)))
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
187
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
188 # The headers of Yadex and Atclib
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
189 HEADERS_YADEX := $(wildcard src/*.h)
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
190 HEADERS_ATCLIB = atclib/atclib.h
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
191
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
192 # All the source files, including the headers.
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
193 SRC = $(filter-out src/config.cc, $(SRC_YADEX)) \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
194 $(filter-out src/config.h, $(HEADERS_YADEX)) \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
195 $(SRC_ATCLIB) $(HEADERS_ATCLIB)
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
196
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
197 # The files on which youngest is run.
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
198 SRC_NON_GEN = $(filter-out src/credits.cc src/prefix.cc src/version.cc, $(SRC))
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
199
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
200 # The object files
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
201 OBJ_CONFIG =# $(OBJDIR)/config.o
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
202 DOBJ_CONFIG =# $(DOBJDIR)/config.o
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
203 OBJ_YADEX = $(addprefix $(OBJDIR)/, $(addsuffix .o, $(MODULES_YADEX)))
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
204 DOBJ_YADEX = $(addprefix $(DOBJDIR)/, $(addsuffix .o, $(MODULES_YADEX)))
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
205 OBJ_ATCLIB = $(addprefix $(OBJDIR_ATCLIB)/, $(addsuffix .o,$(MODULES_ATCLIB)))
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
206 DOBJ_ATCLIB = $(addprefix $(DOBJDIR_ATCLIB)/, $(addsuffix .o,$(MODULES_ATCLIB)))
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
207
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
208 # The game definition files.
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
209 YGD = $(addprefix ygd/, \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
210 doom.ygd doom02.ygd doom04.ygd doom05.ygd \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
211 doom2.ygd doompr.ygd heretic.ygd hexen.ygd \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
212 strife.ygd strife10.ygd)
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
213
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
214 # Files that are used with scripts/process to
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
215 # generate files that are included in the
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
216 # distribution archive.
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
217 DOC1_SRC = \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
218 docsrc/README \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
219 docsrc/README.doc
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
220
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
221 # Files that are used with scripts/process to
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
222 # generate files that go in the doc/ directory
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
223 # and are NOT included in the archive.
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
224 DOC2_SRC_HTML = \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
225 docsrc/advanced.html \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
226 docsrc/contact.html \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
227 docsrc/credits.html \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
228 docsrc/deu_diffs.html \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
229 docsrc/editing_docs.html \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
230 docsrc/faq.html \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
231 docsrc/feedback.html \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
232 docsrc/getting_started.html \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
233 docsrc/hackers_guide.html \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
234 docsrc/help.html \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
235 docsrc/index.html \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
236 docsrc/keeping_up.html \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
237 docsrc/legal.html \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
238 docsrc/packagers_guide.html \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
239 docsrc/palette.html \
24
b2dc19044bf3 Import simple 3D preview, an old patch by Andrew Apted. Pressing 'R' key
Matti Hamalainen <ccr@tnsp.org>
parents: 22
diff changeset
240 docsrc/preview.html \
0
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
241 docsrc/reporting.html \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
242 docsrc/tips.html \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
243 docsrc/trivia.html \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
244 docsrc/trouble.html \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
245 docsrc/users_guide.html \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
246 docsrc/wad_specs.html \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
247 docsrc/ygd.html
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
248
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
249 DOC2_SRC_MISC = \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
250 docsrc/yadex.6 \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
251 # docsrc/yadex.lsm\
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
252
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
253 # Files that must be put in the distribution
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
254 # archive. Most (but not all) are generated from
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
255 # $(DOC1_SRC_*) into the base directory.
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
256 DOC1 = FAQ README doc/README
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
257
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
258 # Files that go in the doc/ directory and must
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
259 # NOT be put in the distribution archive. Most
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
260 # are either generated from $(DOC2_SRC_*) or
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
261 # symlinked for docsrc/*.png.
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
262 DOC2 = $(addprefix doc/, $(PIX) $(notdir $(DOC2_SRC_HTML) $(DOC2_SRC_MISC)))
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
263
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
264 # Misc. other files that must be put in the
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
265 # distribution archive.
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
266 MISC_FILES = \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
267 boost/boost/config.hpp \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
268 boost/boost/config/compiler/borland.hpp \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
269 boost/boost/config/compiler/comeau.hpp \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
270 boost/boost/config/compiler/common_edg.hpp \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
271 boost/boost/config/compiler/compaq_cxx.hpp \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
272 boost/boost/config/compiler/gcc.hpp \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
273 boost/boost/config/compiler/greenhills.hpp \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
274 boost/boost/config/compiler/hp_acc.hpp \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
275 boost/boost/config/compiler/intel.hpp \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
276 boost/boost/config/compiler/kai.hpp \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
277 boost/boost/config/compiler/metrowerks.hpp \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
278 boost/boost/config/compiler/mpw.hpp \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
279 boost/boost/config/compiler/sgi_mipspro.hpp \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
280 boost/boost/config/compiler/sunpro_cc.hpp \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
281 boost/boost/config/compiler/vacpp.hpp \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
282 boost/boost/config/compiler/visualc.hpp \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
283 boost/boost/config/platform/aix.hpp \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
284 boost/boost/config/platform/beos.hpp \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
285 boost/boost/config/platform/bsd.hpp \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
286 boost/boost/config/platform/cygwin.hpp \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
287 boost/boost/config/platform/hpux.hpp \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
288 boost/boost/config/platform/irix.hpp \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
289 boost/boost/config/platform/linux.hpp \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
290 boost/boost/config/platform/macos.hpp \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
291 boost/boost/config/platform/solaris.hpp \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
292 boost/boost/config/platform/win32.hpp \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
293 boost/boost/config/posix_features.hpp \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
294 boost/boost/config/select_compiler_config.hpp \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
295 boost/boost/config/select_platform_config.hpp \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
296 boost/boost/config/select_stdlib_config.hpp \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
297 boost/boost/config/stdlib/dinkumware.hpp \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
298 boost/boost/config/stdlib/libstdcpp3.hpp \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
299 boost/boost/config/stdlib/modena.hpp \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
300 boost/boost/config/stdlib/msl.hpp \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
301 boost/boost/config/stdlib/roguewave.hpp \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
302 boost/boost/config/stdlib/sgi.hpp \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
303 boost/boost/config/stdlib/stlport.hpp \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
304 boost/boost/config/stdlib/vacpp.hpp \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
305 boost/boost/config/suffix.hpp \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
306 boost/boost/config/user.hpp \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
307 boost/boost/smart_ptr.hpp \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
308 boost/boost/static_assert.hpp \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
309 boost/boost/utility.hpp \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
310 boost/boost/utility/base_from_member.hpp \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
311 boost/boost/utility_fwd.hpp \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
312 cache/copyright.man \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
313 cache/copyright.txt \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
314 cache/pixlist \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
315 cache/srcdate \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
316 cache/uptodate \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
317 configure \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
318 docsrc/copyright \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
319 CHANGES \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
320 COPYING \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
321 COPYING.LIB \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
322 GNUmakefile \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
323 Makefile \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
324 TODO \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
325 VERSION \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
326 yadex.cfg \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
327 yadex.dep
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
328
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
329 # The images used in the HTML doc. FIXME: "<img"
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
330 # and "src=" have to be on the same line. These
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
331 # are symlinked into doc/ when $(DOC2) is made.
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
332 PIX = $(shell cat cache/pixlist)
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
333
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
334 # The script files.
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
335 SCRIPTS = $(addprefix scripts/, \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
336 copyright \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
337 ftime.1 \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
338 ftime.c \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
339 install.c \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
340 mkinstalldirs \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
341 notexist.c \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
342 process \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
343 youngest)
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
344
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
345 # The patches
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
346 PATCHES = $(addprefix patches/, \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
347 README \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
348 1.5.0_gcc27.diff)
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
349
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
350 # All files that must be put in the distribution archive.
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
351 ARC_FILES = $(sort $(DOC1) $(DOC1_SRC) $(DOC2_SRC_HTML) $(DOC2_SRC_MISC)\
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
352 $(MISC_FILES) $(addprefix docsrc/, $(PIX)) $(SCRIPTS) $(SRC) $(YGD)\
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
353 $(PATCHES))
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
354
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
355 # The "root" directory of the archives. The
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
356 # basename of the archives is also based on this.
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
357 ARCHIVE := yadex-$(VERSION)
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
358 ARCPREV := yadex-$(VERPREV)
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
359 ARCDIFF := yadex-$(VERSION).diff
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
360
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
361 # Cosmetic
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
362 CFLAGS := $(strip $(CFLAGS))
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
363 DCFLAGS := $(strip $(DCFLAGS))
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
364 CXXFLAGS := $(strip $(CXXFLAGS))
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
365 DCXXFLAGS := $(strip $(DCXXFLAGS))
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
366 LDFLAGS := $(strip $(LDFLAGS))
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
367 DLDFLAGS := $(strip $(DLDFLAGS))
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
368
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
369
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
370 ########################################################################
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
371 #
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
372 # Targets for
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
373 # end users.
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
374 #
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
375 ########################################################################
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
376
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
377 .PHONY: all
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
378 all: doc yadex.dep yadex $(YGD)
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
379
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
380 .PHONY: yadex
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
381 yadex: $(OBJDIR)/yadex
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
382
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
383 $(OBJDIR)/yadex: $(OBJ_CONFIG) $(OBJ_YADEX) $(OBJ_ATCLIB) $(MAKEFILE)
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
384 @echo "** Linking Yadex"
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
385 $(CXX) $(OBJ_CONFIG) $(OBJ_YADEX) $(OBJ_ATCLIB) -o $@ \
37
5f366c1ed459 Add support for GNU readline library for easier editing of the commands.
Matti Hamalainen <ccr@tnsp.org>
parents: 36
diff changeset
386 -L$(X11LIBDIR) -lX11 -lm -lc $(LDFLAGS) $(EXTRA_LDFLAGS)
0
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
387
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
388 .PHONY: test
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
389 test:
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
390 $(OBJDIR)/yadex $(A)
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
391
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
392 .PHONY: install
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
393 install: $(OBJDIR)/install
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
394 @scripts/mkinstalldirs $(BINDIR)
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
395 @scripts/mkinstalldirs $(ETCDIR)
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
396 @scripts/mkinstalldirs $(MANDIR)
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
397 @scripts/mkinstalldirs $(MANDIR)/man6
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
398 @scripts/mkinstalldirs $(SHAREDIR)
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
399 $(OBJDIR)/install -m 755 $(OBJDIR)/yadex $(BINDIR)/yadex-$(VERSION)
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
400 rm -f $(BINDIR)/yadex
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
401 ln -s yadex-$(VERSION) $(BINDIR)/yadex
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
402 $(OBJDIR)/install -m 644 doc/yadex.6 $(MANDIR)/man6/yadex-$(VERSION).6
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
403 rm -f $(MANDIR)/man6/yadex.6
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
404 ln -s yadex-$(VERSION).6 $(MANDIR)/man6/yadex.6
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
405 $(OBJDIR)/install -m 644 -d $(SHAREDIR) $(YGD)
36
50df08fdfb2c Use [ ] instead of test.
Matti Hamalainen <ccr@tnsp.org>
parents: 32
diff changeset
406 @if [ ! -e $(ETCDIR)/yadex.cfg ]; then $(OBJDIR)/install -m 644 -d $(ETCDIR) yadex.cfg;fi
0
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
407 @echo "---------------------------------------------------------------"
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
408 @echo " Yadex is now installed."
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
409 @echo
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
410 @echo " Before you run it, enter the paths to your iwads in"
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
411 @echo " $(ETCDIR)/yadex.cfg or ~/.yadex/yadex.cfg."
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
412 @echo " When you're done, type \"yadex\" to start."
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
413 @echo " If you're confused, take a look at doc/index.html."
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
414 @echo
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
415 @echo " Happy editing !"
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
416 @echo "---------------------------------------------------------------"
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
417
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
418 .PHONY: clean
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
419 clean:
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
420 rm -f $(OBJ_CONFIG) $(OBJ_YADEX) $(OBJ_ATCLIB) $(OBJDIR)/yadex
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
421 rm -f $(DOBJ_CONFIG) $(DOBJ_YADEX) $(DOBJ_ATCLIB) $(DOBJDIR)/yadex
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
422 rm -f $(OBJDIR)/ftime
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
423 rm -f $(OBJDIR)/install
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
424 rm -f $(OBJDIR)/notexist
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
425 rm -f $(OBJDIR)
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
426 rm -f $(DOBJDIR)
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
427 rm -rf doc
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
428
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
429 .PHONY: dclean
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
430 dclean:
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
431 rm -rf $(DOBJPHYSDIR)
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
432 rm -f $(DOBJDIR)
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
433
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
434 .PHONY: doc
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
435 doc: cache/pixlist docdirs $(DOC1) doc2
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
436
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
437 # Have to put it separately because evaluation
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
438 # of $(DOC2) requires cache/pixlist to exist.
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
439 .PHONY: doc2
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
440 doc2: $(DOC2)
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
441
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
442 .PHONY: help
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
443 help:
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
444 @echo User targets:
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
445 @echo "make [all] Build everything"
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
446 @echo "make yadex Build Yadex"
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
447 @echo "make test [A=args] Test Yadex"
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
448 @echo "make install Install everything"
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
449 @echo "make showconf Show current configuration"
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
450 @echo
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
451 @echo Hacker targets:
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
452 @echo "make dall Build debug version of everything"
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
453 @echo "make dyadex Build debug version of Yadex"
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
454 @echo "make dtest [A=args] Test debug version of Yadex"
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
455 @echo "make dg Run debug version of Yadex through gdb"
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
456 @echo "make dd Run debug version of Yadex through ddd"
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
457 @echo "make doc Update doc"
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
458 @echo "make man View man page with man"
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
459 @echo "make dvi View man page with xdvi"
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
460 @echo "make ps View man page with gv"
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
461 @echo "make dist Create distribution archive"
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
462 @echo "make save Create backup archive"
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
463
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
464
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
465 ########################################################################
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
466 #
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
467 # Targets meant for
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
468 # hackers only.
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
469 #
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
470 ########################################################################
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
471
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
472 # d: Compile and run
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
473 .PHONY: d
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
474 d: dyadex dtest
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
475
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
476 .PHONY: save
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
477 save:
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
478 tar -cjvf yadex-$$(date '+%Y%m%d').tar.bz2 \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
479 --exclude "*.wad" \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
480 --exclude "*.zip" \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
481 --exclude "core" \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
482 --exclude "dos/*" \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
483 --exclude "obj" \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
484 --exclude "dobj" \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
485 --exclude "old/*" \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
486 --exclude "*~" \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
487 --exclude "*.bak" \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
488 --exclude "web/arc" \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
489 --exclude yadex-$$(date '+%Y%m%d').tar.bz2 \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
490 .
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
491
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
492 .PHONY: dall
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
493 dall: yadex.dep dyadex $(YGD)
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
494
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
495 .PHONY: dyadex
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
496 dyadex: $(DOBJDIR)/yadex
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
497
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
498 $(DOBJDIR)/yadex: $(DOBJ_CONFIG) $(DOBJ_YADEX) $(DOBJ_ATCLIB) $(MAKEFILE)
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
499 @echo "** Linking Yadex"
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
500 $(CXX) $(DOBJ_CONFIG) $(DOBJ_YADEX) $(DOBJ_ATCLIB) -o $@ \
37
5f366c1ed459 Add support for GNU readline library for easier editing of the commands.
Matti Hamalainen <ccr@tnsp.org>
parents: 36
diff changeset
501 -L$(X11LIBDIR) -lX11 -lm -lc $(DLDFLAGS) $(EXTRA_LDFLAGS)
0
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
502
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
503 .PHONY: dtest
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
504 dtest:
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
505 $(DOBJDIR)/yadex $(A)
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
506 gprof $(DOBJDIR)/yadex >gprof.out
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
507
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
508 .PHONY: dg
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
509 dg:
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
510 gdb $(DOBJDIR)/yadex
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
511
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
512 .PHONY: dd
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
513 dd:
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
514 ddd $(DOBJDIR)/yadex
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
515
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
516 .PHONY: asm
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
517 asm: $(addprefix $(OBJDIR)/, $(addsuffix .S, $(MODULES_YADEX)))
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
518
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
519 # Generate the distribution archives. Requires GNU tar,
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
520 # GNU cp, gzip and optionally bzip2 (if distbz2 is
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
521 # uncommented).
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
522 .PHONY: dist
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
523 dist: changes distimage distgz distdiff #distbz2
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
524 @echo "** Removing distribution image tree $(ARCHIVE)"
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
525 rm -r $(ARCHIVE)
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
526
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
527 .PHONY: distimage
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
528 distimage: all $(ARC_FILES)
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
529 @echo "** Creating distribution image tree $(ARCHIVE)"
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
530 rm -rf $(ARCHIVE)
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
531 scripts/mkinstalldirs $(ARCHIVE)
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
532 @tar -cf - $(ARC_FILES) | (cd $(ARCHIVE); tar -xf -)
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
533
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
534 .PHONY: distgz
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
535 distgz: distimage
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
536 @echo "** Creating tar.gz distribution"
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
537 tar -czf $(ARCHIVE).tar.gz $(ARCHIVE)
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
538
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
539 .PHONY: distbz2
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
540 distbz2: distimage
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
541 @echo "** Creating .tar.bz2 distribution"
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
542 tar -cIf $(ARCHIVE).tar.bz2 $(ARCHIVE)
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
543
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
544 .PHONY: distdiff
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
545 TMP0 = $$HOME/tmp
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
546 TMPPREV = $(TMP0)/$(ARCPREV)
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
547 TMPCURR = $(TMP0)/$(ARCHIVE)
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
548 distdiff:
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
549 @echo "** Building the diff distribution"
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
550 @echo "Creating the diff"
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
551 rm -rf $(TMPPREV) $(TMPCURR) $(TMPDIFF)
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
552 mkdir -p $(TMP0)
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
553 tar -xzf $(ARCHIVE).tar.gz -C $(TMP0)
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
554 tar -xzf ../yadex-arc/pub/$(ARCPREV).tar.gz -C $(TMP0)
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
555 scripts/process docsrc/README.diff >$(TMP0)/$(ARCDIFF)
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
556 echo >>$(TMP0)/$(ARCDIFF)
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
557 cd $(TMP0) && (diff -uaNr $(ARCPREV) $(ARCHIVE) >>$(ARCDIFF) || true)
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
558 @# KLUDGE - On my system, just "! grep" makes make choke
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
559 true; ! grep "^Binary files .* and .* differ" $(TMP0)/$(ARCDIFF)
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
560 gzip -f $(TMP0)/$(ARCDIFF)
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
561 @echo "Verifying the diff"
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
562 cd $(TMPPREV) && gzip -d <../$(ARCDIFF).gz | patch -p1
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
563 @# FIXME remove -N after 1.6 is done, it's there because
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
564 @# uptodate has been moved between 1.5 and 1.6 and since
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
565 @# it's empty it remains in $(ARCPREV).
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
566 cd $(TMP0) && diff -rP $(ARCHIVE) $(ARCPREV)
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
567 mv $(TMP0)/$(ARCDIFF).gz .
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
568 @echo "Cleaning up"
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
569 cd $(TMP0) && rm -rf $(ARCPREV)
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
570 cd $(TMP0) && rm -rf $(ARCHIVE)
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
571
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
572 .PHONY: showconf
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
573 showconf:
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
574 @echo "ARCHIVE \"$(ARCHIVE)\""
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
575 @echo "BINDIR \"$(BINDIR)\""
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
576 @echo "CC \"$(CC)\""
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
577 @echo "CFLAGS \"$(CFLAGS)\""
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
578 @echo "CXX \"$(CXX)\""
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
579 @echo "CXXFLAGS \"$(CXXFLAGS)\""
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
580 @echo "DCFLAGS \"$(DCFLAGS)\""
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
581 @echo "DCXXFLAGS \"$(DCXXFLAGS)\""
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
582 @echo "DLDFLAGS \"$(DLDFLAGS)\""
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
583 @echo "ETCDIR \"$(ETCDIR)\""
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
584 @echo "ETCDIRNV \"$(ETCDIRNV)\""
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
585 @echo "HAVE_GETTIMEOFDAY \"$(HAVE_GETTIMEOFDAY)\""
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
586 @echo "HAVE_NANOSLEEP \"$(HAVE_NANOSLEEP)\""
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
587 @echo "HAVE_SNPRINTF \"$(HAVE_SNPRINTF)\""
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
588 @echo "HAVE_USLEEP \"$(HAVE_USLEEP)\""
37
5f366c1ed459 Add support for GNU readline library for easier editing of the commands.
Matti Hamalainen <ccr@tnsp.org>
parents: 36
diff changeset
589 @echo "HAVE_READLINE \"$(HAVE_READLINE)\""
0
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
590 @echo "LDFLAGS \"$(LDFLAGS)\""
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
591 @echo "MANDIR \"$(MANDIR)\""
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
592 @echo "OS \"$(OS)\""
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
593 @echo "PREFIX \"$(PREFIX)\""
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
594 @echo "SHAREDIR \"$(SHAREDIR)\""
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
595 @echo "SHAREDIRNV \"$(SHAREDIRNV)\""
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
596 @echo "SHELL \"$(SHELL)\""
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
597 @echo "SYSTEM \"$(SYSTEM)\""
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
598 @echo "VERSION \"$(VERSION)\""
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
599 @echo "X11INCLUDEDIR \"$(X11INCLUDEDIR)\""
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
600 @echo "X11LIBDIR \"$(X11LIBDIR)\""
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
601 @echo "CXX --version \"`$(CXX) --version`\""
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
602 @echo "CC --version \"`$(CC) --version`\""
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
603 @echo "shell \"$$SHELL\""
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
604 @echo "uname \"`uname`\""
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
605
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
606
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
607 ########################################################################
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
608 #
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
609 # Internal targets, not meant
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
610 # to be invoked directly
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
611 #
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
612 ########################################################################
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
613
2
70951bfb02b1 Fix a dependency problem. Old patch from André Majorel.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
614 # If Makefile.config or config.h don't exist, give a hint...
0
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
615 $(OBJDIR)/Makefile.config:
2
70951bfb02b1 Fix a dependency problem. Old patch from André Majorel.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
616 $(OBJDIR)/config.h:
0
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
617 @echo "Sorry guv'nor, but... did you run ./configure ?" >&2
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
618 @false
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
619
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
620 $(OBJDIR)/files_etc.man: $(OBJDIR)/config.etc $(MAKEFILE)
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
621 sed 's/%v/$(VERSION)/g; s,.*,.B &/yadex.cfg,' $< >$@
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
622
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
623 $(OBJDIR)/files_share.man: $(OBJDIR)/config.share $(MAKEFILE)
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
624 sed 's/%v/$(VERSION)/g; s,.*,.BI &/ game .ygd,' $< >$@
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
625
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
626 # Dependencies of the modules of Yadex
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
627 # -Y is here to prevent the inclusion of dependencies on
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
628 # /usr/include/*.h etc. As a side-effect, it generates many
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
629 # warnings, hence "2>/dev/null".
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
630 #
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
631 # The purpose of the awk script is to transform this input :
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
632 #
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
633 # src/foo.o: src/whatever.h
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
634 #
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
635 # into this output :
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
636 #
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
637 # obj/0/foo.o: src/whatever.h
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
638 # dobj/0/foo.o: src/whatever.h
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
639 #
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
640 # Note: the modules of Atclib are not scanned as they all
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
641 # depend on $(HEADERS_ATCLIB) and nothing else.
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
642
2
70951bfb02b1 Fix a dependency problem. Old patch from André Majorel.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
643 yadex.dep: $(SRC_NON_GEN) src/config.h
0
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
644 @echo "Generating $@"
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
645 @makedepend -f- -Y -Iatclib $(SRC_NON_GEN) 2>/dev/null \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
646 | awk 'sub (/^src/, "") == 1 { \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
647 print "'$(OBJDIR)'" $$0; \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
648 print "'$(DOBJDIR)'" $$0; \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
649 next; \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
650 }' >$@
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
651
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
652 cache/copyright.man: $(MAKEFILE) scripts/copyright docsrc/copyright
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
653 scripts/copyright -m docsrc/copyright >$@
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
654
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
655 cache/copyright.txt: $(MAKEFILE) scripts/copyright docsrc/copyright
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
656 scripts/copyright -t docsrc/copyright | sed 's/^./ &/' >$@
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
657
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
658 # The YYYY-MM-DD date indicated in the parentheses after the
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
659 # version number is the mtime of the most recent source file
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
660 # (where "being a source file" is defined as "being listed in
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
661 # $(SRC_NON_GEN)"). That string is the output of a perl script,
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
662 # scripts/youngest. Since perl is not necessarily installed on
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
663 # all machines, we cache that string in the file cache/srcdate
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
664 # and include that file in the distribution archive. If we
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
665 # didn't do that, people who don't have perl would be unable to
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
666 # build Yadex.
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
667 #
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
668 # Conceptually, cache/srcdate depends on $(SRC_NON_GEN) and
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
669 # doc/*.html depend on cache/srcdate. However, we can't write the
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
670 # makefile that way because if we did, that would cause two
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
671 # problems. Firstly every time a source file is changed,
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
672 # scripts/youngest would be ran, most of the time for nothing
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
673 # since its output is always the same, unless it's never been
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
674 # run today. Secondly, cache/srcdate being just generated, it's
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
675 # more recent than the content of the doc/ directory. The result
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
676 # would be that the entire doc/ directory would be rebuilt every
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
677 # time a single source file is changed, which is guaranteed to
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
678 # have an unnerving effect on the hacker at the keyboard.
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
679 #
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
680 # Part of the solution is to systematically force the mtime of
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
681 # cache/srcdate to 00:00, today. Thus, cache/srcdate always looks
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
682 # older than the content of the doc/ directory, unless it's not
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
683 # been refreshed yet today.
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
684 #
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
685 # But that's not enough because then cache/srcdate also looks
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
686 # always older than the source files it depends on, and thus
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
687 # make attempts to regenerate it every time make is invoked at
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
688 # all, which would render the very existence of cache/srcdate
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
689 # useless. That's why we have another file, cache/uptodate, that
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
690 # we touch to keep track of the time when we last generated
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
691 # cache/srcdate.
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
692 #
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
693 # If there was a such thing as _date-only_ dependencies, I could
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
694 # get away with just this :
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
695 #
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
696 # cache/srcdate: scripts/youngest
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
697 # cache/srcdate <date_dependency_operator> $(SRC_NON_GEN)
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
698 # if perl -v >/dev/null 2>&1; then\
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
699 # scripts/youngest >$@;\
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
700 # else\
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
701 # blah...
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
702 # doc/*.html <date_dependency_operator> cache/srcdate
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
703 # blah...
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
704 #
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
705 # That would save two calls to "touch", one intermediary
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
706 # dependency (cache/uptodate) and a lot of obfuscation.
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
707 cache/srcdate: cache/uptodate
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
708
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
709 cache/uptodate: scripts/youngest $(SRC_NON_GEN)
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
710 @mkdir -p cache
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
711 @if perl -v >/dev/null 2>&1; then \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
712 echo Generating cache/srcdate; \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
713 scripts/youngest $(SRC_NON_GEN) >cache/srcdate; \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
714 touch -t `date '+%m%d'`0000 cache/srcdate; \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
715 elif [ -r cache/srcdate ]; then \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
716 echo Perl not available. Keeping old cache/srcdate; \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
717 else \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
718 echo Perl not available. Creating bogus cache/srcdate; \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
719 date '+%Y-%m-%d' >cache/srcdate; \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
720 fi
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
721 @touch $@;
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
722
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
723 # To compile the modules of Yadex
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
724 # (normal and debugging versions)
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
725 include yadex.dep
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
726
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
727 # It's simpler to copy config.cc into src/ than to have a
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
728 # compilation rule for just one file.
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
729 src/config.cc: $(OBJDIR)/config.cc
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
730 cp -p $< $@
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
731
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
732 src/config.h: $(OBJDIR)/config.h
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
733 cp -p $< $@
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
734
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
735 $(OBJDIR)/%.o: src/%.cc
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
736 $(CXX) -c -Iatclib -Iboost -I$(X11INCLUDEDIR) $(CXXFLAGS) $< -o $@
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
737
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
738 $(DOBJDIR)/%.o: src/%.cc
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
739 $(CXX) -c -Iatclib -Iboost -I$(X11INCLUDEDIR) $(DCXXFLAGS) $< -o $@
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
740
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
741 # To compile the modules of Atclib
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
742 # (normal and debugging versions)
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
743 $(OBJDIR_ATCLIB)/%.o: atclib/%.c $(HEADERS_ATCLIB)
37
5f366c1ed459 Add support for GNU readline library for easier editing of the commands.
Matti Hamalainen <ccr@tnsp.org>
parents: 36
diff changeset
744 $(CC) -c $(CFLAGS) $(EXTRA_CFLAGS) $< -o $@
0
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
745
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
746 $(DOBJDIR_ATCLIB)/%.o: atclib/%.c $(HEADERS_ATCLIB)
37
5f366c1ed459 Add support for GNU readline library for easier editing of the commands.
Matti Hamalainen <ccr@tnsp.org>
parents: 36
diff changeset
747 $(CC) -c $(DCFLAGS) $(EXTRA_CFLAGS) $< -o $@
0
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
748
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
749 # To see the generated assembly code
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
750 # for the modules of Yadex
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
751 $(OBJDIR)/%.S: src/%.cc $(MAKEFILE)
37
5f366c1ed459 Add support for GNU readline library for easier editing of the commands.
Matti Hamalainen <ccr@tnsp.org>
parents: 36
diff changeset
752 $(CXX) $(CXXFLAGS) $(EXTRA_CXXFLAGS) -S -fverbose-asm -Iatclib -Iboost -I$(X11INCLUDEDIR)\
0
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
753 $< -o $@
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
754
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
755 # A source file containing the credits
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
756 src/credits.cc: $(MAKEFILE) docsrc/copyright scripts/copyright
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
757 @echo Generating $@
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
758 @echo '// DO NOT EDIT -- generated from docsrc/copyright' >$@
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
759 scripts/copyright -c docsrc/copyright >>$@
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
760
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
761 # A source file containing just the date of the
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
762 # most recent source file and the version number
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
763 # (found in ./VERSION)
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
764 src/version.cc: $(SRC_NON_GEN) VERSION cache/srcdate $(MAKEFILE)
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
765 @echo Generating $@
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
766 @printf '// DO NOT EDIT -- generated from VERSION\n\n' >$@
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
767 @printf "extern const char *const yadex_source_date = \"%s\";\n" \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
768 `cat cache/srcdate` >>$@
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
769 @printf "extern const char *const yadex_version = \"%s\";\n" \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
770 "$(VERSION)" >>$@
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
771
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
772
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
773 # -------- Doc-related stuff --------
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
774
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
775 docdirs:
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
776 @if [ ! -d doc ]; then mkdir doc; fi
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
777
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
778 cache/pixlist: $(DOC2_SRC_HTML)
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
779 @echo Generating $@
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
780 @mkdir -p cache
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
781 @if perl -v >/dev/null 2>/dev/null; then \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
782 perl -ne '@l = m/<img\s[^>]*src="?([^\s">]+)/io; \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
783 print "@l\n" if @l;' $(DOC2_SRC_HTML) | sort | uniq >$@; \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
784 elif [ -f $@ ]; then \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
785 echo "Sorry, you need Perl to refresh $@. Keeping old $@."; \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
786 else \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
787 echo "Sorry, you need Perl to create $@. Creating empty $@."; \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
788 touch $@; \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
789 fi
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
790
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
791 events.html: ev evhtml
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
792 evhtml -- -n $< >$@
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
793
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
794 events.txt: events.html
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
795 lynx -dump $< >$@
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
796
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
797 changes/changes.html: changes/*.log log2html RELEASE
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
798 ./log2html -- -r `cat RELEASE` -- $$(ls -r changes/*.log) >$@
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
799
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
800 # changes - update the changelog
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
801 .PHONY: changes
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
802 changes: changes/changes.html
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
803 w3m -dump -cols 72 $< >CHANGES
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
804
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
805 # cns - view the changelog with Netscape
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
806 .PHONY: cns
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
807 cns:
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
808 netscape -remote "openURL(file:$$(pwd)/changes/changes.html,new-window)"
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
809
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
810 # clynx - view the changelog with Lynx
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
811 .PHONY: clynx
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
812 clynx:
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
813 lynx changes/changes.html
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
814
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
815 # cless - view the changelog with less
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
816 .PHONY: cless
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
817 cless:
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
818 less CHANGES
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
819
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
820 # man - view the man page with man
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
821 .PHONY: man
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
822 man: doc/yadex.6
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
823 man -l $^
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
824
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
825 # dvi - view the man page with xdvi
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
826 .PHONY: dvi
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
827 dvi: doc/yadex.dvi
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
828 xdvi $^
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
829
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
830 # ps - view the man page with gv
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
831 .PHONY: ps
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
832 ps: doc/yadex.ps
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
833 gv $^
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
834
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
835 # Use docsrc/faq.html and not directly
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
836 # doc/faq.html because we don't want FAQ to be
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
837 # remade at first build time.
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
838 FAQ: docsrc/faq.html
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
839 scripts/process $< >cache/faq.html
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
840 links -width 72 -dump cache/faq.html >$@
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
841 rm cache/faq.html
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
842
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
843 doc/yadex.dvi: doc/yadex.6
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
844 groff -Tdvi -man $^ >$@
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
845
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
846 doc/yadex.ps: doc/yadex.6
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
847 groff -Tps -man $^ >$@
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
848
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
849
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
850 # Generate the doc by filtering them through scripts/process
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
851 PROCESS = \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
852 VERSION \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
853 cache/copyright.man \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
854 cache/copyright.txt \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
855 cache/srcdate \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
856 scripts/process \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
857 $(OBJDIR)/ftime \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
858 $(OBJDIR)/files_etc.man \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
859 $(OBJDIR)/files_share.man \
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
860 $(OBJDIR)/notexist
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
861
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
862 doc/yadex.6: docsrc/yadex.6 $(PROCESS)
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
863 @echo Generating $@
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
864 @scripts/process $< >$@
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
865
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
866 doc/README: docsrc/README.doc $(PROCESS)
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
867 @echo Generating $@
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
868 @scripts/process $< >$@
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
869
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
870 %: docsrc/% $(PROCESS)
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
871 @echo Generating $@
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
872 @scripts/process $< >$@
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
873
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
874 doc/%.html: docsrc/%.html $(PROCESS)
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
875 @echo Generating $@
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
876 @scripts/process $< >$@
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
877
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
878 # The images are just symlinked from docsrc/ to doc/
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
879 doc/%.png: docsrc/%.png
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
880 @rm -f $@
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
881 @ln -s ../$< $@
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
882
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
883 $(OBJDIR)/ftime: scripts/ftime.c
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
884 $(CC) $< -o $@
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
885
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
886 $(OBJDIR)/install: scripts/install.c
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
887 $(CC) $< -o $@
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
888
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
889 $(OBJDIR)/notexist: scripts/notexist.c
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
890 $(CC) $< -o $@
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
891
241c93442be0 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
892