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)
59 XCOMM Installation path for the system resource file
60 VTWMLIBDIR = $(LIBDIR)/twm
62 XCOMM Installation path for the man page
63 VTWMMANDIR = $(MANDIR)
65 XCOMM For the traditional look of TWM as the system fallback,
66 XCOMM change this to "2D"
69 XCOMM ================ End of common editables ======================
71 XCOMM ============= Start of less common editables ==================
73 XCOMM Handy for developers to check man page editions
74 XCOMM (see the end of this file)
79 XCOMM Required to generate HTML or Postscript versions of the man page
80 XCOMM (see the end of this file)
84 XCOMM ============== End of less common editables ===================
86 XCOMM ========= Editing below here should not be necessary ==========
89 DEPLIBS = $(DEPXMULIB) $(DEPEXTENSIONLIB) $(DEPXLIB)
90 LOCAL_LIBRARIES = $(LEXLIB) $(XPMLIB) $(REGEXLIB) $(SOUNDLIB) \
91 $(XMULIB) $(EXTENSIONLIB) $(XLIB)
92 LINTLIBS = $(LINTXMU) $(LINTEXTENSIONLIB) $(LINTXLIB)
93 EXTRA_INCLUDES = $(XPMINC) $(REGEXINC) $(SOUNDINC)
94 DEFINES = $(SIGNAL_DEFINES) $(NO_XPM_SUPPORT) $(NO_REGEX_SUPPORT) \
95 $(NO_SOUND_SUPPORT) $(NO_I18N_SUPPORT) $(NO_M4_SUPPORT)
97 SRCS = gram.c lex.c deftwmrc.c add_window.c gc.c list.c \
98 twm.c sound.c parse.c menus.c events.c resize.c util.c \
99 version.c iconmgr.c cursor.c regions.c applets.c \
100 icons.c desktop.c doors.c lastmake.c
102 OBJS = gram.o lex.o deftwmrc.o add_window.o gc.o list.o \
103 twm.o sound.o parse.o menus.o events.o resize.o util.o \
104 version.o iconmgr.o cursor.o regions.o applets.o \
105 icons.o desktop.o doors.o lastmake.o
109 SpecialObjectRule(menus.o,gram.h,$(NO_BUILD_INFO) $(NEED_PROCESS_H))
111 SpecialObjectRule(util.o,gram.h,$(NEED_PUTENV_F))
113 SpecialObjectRule(events.o,gram.h,$(NEED_SELECT_H))
115 SpecialObjectRule(parse.o,gram.h,$(NEED_YYLINENO_V) \
116 '-DSYSTEM_VTWMRC="'$(VTWMLIBDIR)'/system.vtwmrc"' \
117 '-DSYSTEM_TWMRC="'$(VTWMLIBDIR)'/system.twmrc"')
119 SpecialObjectRule(add_window.o applets.o icons.o \
120 list.o regions.o sound.o twm.o,gram.h,NullParameter)
122 NormalProgramTarget(vtwm,$(OBJS),$(DEPLIBS),$(LOCAL_LIBRARIES),NullParameter)
124 InstallProgram(vtwm,$(VTWMBINDIR))
125 InstallManPage(vtwm,$(VTWMMANDIR))
126 InstallNonExecFile(system.vtwmrc,$(VTWMLIBDIR))
128 depend:: lex.c gram.c deftwmrc.c lastmake.c vtwm.man
131 $(RM) deftwmrc.* lastmake.*
134 $(RM) deftwmrc.* lastmake.*
138 $(RM) y.tab.h y.tab.c lex.yy.c gram.h gram.c lex.c deftwmrc.c \
139 lastmake.c system.vtwmrc vtwm.dw vtwm.ser vtwm.html vtwm.ps vtwm.man
141 gram.h gram.c: gram.y
142 $(YACC) $(YFLAGS) gram.y
146 deftwmrc.c: system.vtwmrc
149 echo ' * This file is generated automatically from the default' >>$@
150 echo ' * VTWM bindings file system.vtwmrc.'$(SYS_VTWMRC_LOOK)' by the VTWM Makefile.' >>$@
153 echo 'char *defTwmrc[] = {' >>deftwmrc.c
154 sed -e '/^$$/d' -e '/^#/d' -e 's/"/\\"/g' -e 's/^/"/' -e 's/$$/",/' -e 's/[ ]\{1,\}/ /g' -e 's/^" /"/' system.vtwmrc >>$@
155 echo '(char *)0 };' >>$@
160 echo ' * This file is generated automatically by the VTWM Makefile.' >>$@
163 echo 'char *lastmake[] = {' >>lastmake.c
164 echo ' "Platform: '`uname -r -s`'",' >>$@
165 echo ' "Build: '`date`'",' >>$@
170 $(CP) $@.$(SYS_VTWMRC_LOOK) $@
176 XCOMM Handy for developers to check the man page
178 $(DEROFF) vtwm.man | $(DW) >vtwm.dw
179 @if test -s vtwm.dw ; \
181 echo Doubled words in vtwm.man ... ; \
184 spell vtwm.ser: vtwm.man vtwm.sok
185 $(DEROFF) vtwm.man | $(SPELL) +vtwm.sok >vtwm.ser
186 @if test -s vtwm.ser ; \
188 echo Spelling exceptions in vtwm.man ... ; \
192 XCOMM If you wish to generate HTML or Postscript versions of the man page,
193 XCOMM enter 'make vtwm.html' or 'make vtwm.ps'