5 XCOMM $XConsortium: Imakefile,v 1.33 91/07/17 00:48:06 gildea Exp $
7 XCOMM Here is an Imakefile for VTWM.
8 XCOMM I like to use Imakefiles for everything, and I am sure other
9 XCOMM people do also, so perhaps you could do us all a favor and
10 XCOMM distribute this one.
12 XCOMM =============== Start of common editables =====================
14 XCOMM To omit XPM image support, uncomment this
15 XCOMM NO_XPM_SUPPORT = -DNO_XPM_SUPPORT
16 XCOMM and comment these
19 XCOMM (version 3.4h of the XPM library is the earliest supported I know of)
21 XCOMM To omit regular expressions ("RE"s) support, uncomment this
22 XCOMM NO_REGEX_SUPPORT = -DNO_REGEX_SUPPORT
23 XCOMM and comment these
26 XCOMM (the library must conform to the POSIX 1003.2 specification)
28 XCOMM To omit sound support, uncomment this
29 XCOMM NO_SOUND_SUPPORT = -DNO_SOUND_SUPPORT
30 XCOMM and comment these
31 SOUNDLIB = -L/usr/local/lib -lrplay
32 SOUNDINC = -I/usr/local/include
33 XCOMM (sound is supported only by way of the rplay library)
35 XCOMM To omit Internationalization support, uncomment this
36 XCOMM NO_I18N_SUPPORT = -DNO_I18N_SUPPORT
38 XCOMM To omit m4 pre-processing of resource files, uncomment this
39 XCOMM NO_M4_SUPPORT = -DNO_M4_SUPPORT
41 XCOMM To omit platform and build info in the version window, uncomment this
42 XCOMM NO_BUILD_INFO = -DNO_BUILD_INFO
44 XCOMM For lexers that don't track line numbers, uncomment this
45 XCOMM NEED_YYLINENO_V = -DNEED_YYLINENO_V
47 XCOMM For those systems that don't have putenv(), uncomment this
48 XCOMM NEED_PUTENV_F = -DNEED_PUTENV_F
50 XCOMM For those systems that require sys/select.h, uncomment this
51 XCOMM NEED_SELECT_H = -DNEED_SELECT_H
53 XCOMM For those systems that require process.h, uncomment this
54 XCOMM NEED_PROCESS_H = -DNEED_PROCESS_H
56 XCOMM Installation path for the binary
57 VTWMBINDIR = $(BINDIR)
60 * If EtcX11Directory is defined, we're using a relatively modern X.Org or
63 #ifdef EtcX11Directory
64 CONFDIR = $(ETCX11DIR)
69 XCOMM Installation path for VTWM's system resource file
70 VTWMCONFDIR = $(CONFDIR)/vtwm
72 XCOMM Location where we search for TWM's system resource file
73 TWMCONFDIR = $(CONFDIR)/twm
75 XCOMM Installation path for the man page
76 VTWMMANDIR = $(MANDIR)
78 XCOMM For the traditional look of TWM as the system fallback,
79 XCOMM change this to "2D"
82 XCOMM ================ End of common editables ======================
84 XCOMM ============= Start of less common editables ==================
86 XCOMM Handy for developers to check man page editions
87 XCOMM (see the end of this file)
92 XCOMM Required to generate HTML or Postscript versions of the man page
93 XCOMM (see the end of this file)
97 XCOMM ============== End of less common editables ===================
99 XCOMM ========= Editing below here should not be necessary ==========
102 DEPLIBS = $(DEPXMULIB) $(DEPEXTENSIONLIB) $(DEPXLIB)
103 LOCAL_LIBRARIES = $(LEXLIB) $(XPMLIB) $(REGEXLIB) $(SOUNDLIB) \
104 $(XMULIB) $(EXTENSIONLIB) $(XLIB)
105 LINTLIBS = $(LINTXMU) $(LINTEXTENSIONLIB) $(LINTXLIB)
106 EXTRA_INCLUDES = $(XPMINC) $(REGEXINC) $(SOUNDINC)
107 DEFINES = $(SIGNAL_DEFINES) $(NO_XPM_SUPPORT) $(NO_REGEX_SUPPORT) \
108 $(NO_SOUND_SUPPORT) $(NO_I18N_SUPPORT) $(NO_M4_SUPPORT)
110 SRCS = gram.c lex.c deftwmrc.c add_window.c gc.c list.c \
111 twm.c sound.c parse.c menus.c events.c resize.c util.c \
112 version.c iconmgr.c cursor.c regions.c applets.c \
113 icons.c desktop.c doors.c lastmake.c
115 OBJS = gram.o lex.o deftwmrc.o add_window.o gc.o list.o \
116 twm.o sound.o parse.o menus.o events.o resize.o util.o \
117 version.o iconmgr.o cursor.o regions.o applets.o \
118 icons.o desktop.o doors.o lastmake.o
122 SpecialObjectRule(menus.o,gram.h,$(NO_BUILD_INFO) $(NEED_PROCESS_H))
124 SpecialObjectRule(util.o,gram.h,$(NEED_PUTENV_F))
126 SpecialObjectRule(events.o,gram.h,$(NEED_SELECT_H))
128 SpecialObjectRule(parse.o,gram.h,$(NEED_YYLINENO_V) \
129 '-DSYSTEM_VTWMRC="'$(VTWMCONFDIR)'/system.vtwmrc"' \
130 '-DSYSTEM_TWMRC="'$(VTWMCONFDIR)'/system.twmrc"')
132 SpecialObjectRule(add_window.o applets.o icons.o \
133 list.o regions.o sound.o twm.o,gram.h,NullParameter)
135 NormalProgramTarget(vtwm,$(OBJS),$(DEPLIBS),$(LOCAL_LIBRARIES),NullParameter)
137 InstallProgram(vtwm,$(VTWMBINDIR))
138 InstallManPage(vtwm,$(VTWMMANDIR))
139 InstallNonExecFile(system.vtwmrc,$(VTWMCONFDIR))
141 depend:: lex.c gram.c deftwmrc.c lastmake.c vtwm.man
144 $(RM) deftwmrc.* lastmake.*
147 $(RM) deftwmrc.* lastmake.*
151 $(RM) y.tab.h y.tab.c lex.yy.c gram.h gram.c lex.c deftwmrc.c \
152 lastmake.c system.vtwmrc vtwm.dw vtwm.ser vtwm.html vtwm.ps vtwm.man
154 gram.h gram.c: gram.y
155 $(YACC) $(YFLAGS) gram.y
159 deftwmrc.c: system.vtwmrc
162 echo ' * This file is generated automatically from the default' >>$@
163 echo ' * VTWM bindings file system.vtwmrc.'$(SYS_VTWMRC_LOOK)' by the VTWM Makefile.' >>$@
166 echo 'char *defTwmrc[] = {' >>deftwmrc.c
167 sed -e '/^$$/d' -e '/^#/d' -e 's/"/\\"/g' -e 's/^/"/' -e 's/$$/",/' -e 's/[ ]\{1,\}/ /g' -e 's/^" /"/' system.vtwmrc >>$@
168 echo '(char *)0 };' >>$@
173 echo ' * This file is generated automatically by the VTWM Makefile.' >>$@
176 echo 'char *lastmake[] = {' >>lastmake.c
177 ifdef SOURCE_DATE_EPOCH
178 echo ' "Platform: -",' >>$@
179 echo ' "Build: '`LC_ALL=C date --utc --date=@$${SOURCE_DATE_EPOCH}`'",' >>$@
181 echo ' "Platform: '`uname -r -s`'",' >>$@
182 echo ' "Build: '`date`'",' >>$@
188 $(CP) $@.$(SYS_VTWMRC_LOOK) $@
194 XCOMM Handy for developers to check the man page
196 $(DEROFF) vtwm.man | $(DW) >vtwm.dw
197 @if test -s vtwm.dw ; \
199 echo Doubled words in vtwm.man ... ; \
202 spell vtwm.ser: vtwm.man vtwm.sok
203 $(DEROFF) vtwm.man | $(SPELL) +vtwm.sok >vtwm.ser
204 @if test -s vtwm.ser ; \
206 echo Spelling exceptions in vtwm.man ... ; \
210 XCOMM If you wish to generate HTML or Postscript versions of the man page,
211 XCOMM enter 'make vtwm.html' or 'make vtwm.ps'