-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathImakefile
79 lines (62 loc) · 2.41 KB
/
Imakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#
# Here is an Imakefile for piewm. The below defines for make are
# neccessary to have things work as expected, please don't remove
# any of them.
#
YFLAGS = -d
DEPLIBS = $(DEPXMULIB) $(DEPEXTENSIONLIB) $(DEPXLIB)
# real programmers use Emacs
TAGS = etags
# change if you want it to look elsewhere for its files.
PIEWMDIR = /usr/local/lib/piewm
#
# Keep uncommented to allow the xloadimage program by Jim Frost to
# perform your background loading. (thus allowing loading of
# other image formats besides Xpm or Xbm)
# Chris P. Ross
XLOADIM_DEF = -DXLOADIMAGE=\"/usr/local/bin/xloadimage\"
MATHLIB = -lm
LOCAL_DEFINES = -DSHAPE
/**/# Ultrix doesn't have a mkstemp in libc...
#ifdef UltrixArchitecture
ULTRIX_DEFINES = -DNOSTEMP
#endif
LOCAL_LIBRARIES = $(XMULIB) $(EXTENSIONLIB) $(XLIB) $(MATHLIB) -lXpm
LINTLIBS = $(LINTXMU) $(LINTEXTENSIONLIB) $(LINTXLIB)
DEFINES = ExtensionDefines $(LOCAL_DEFINES) $(SIGNAL_DEFINES) $(ULTRIX_DEFINES)
SRCS = gram.c lex.c deftwmrc.c add_window.c gc.c list.c twm.c \
parse.c menus.c events.c resize.c util.c version.c iconmgr.c \
cursor.c icons.c vdt.c move.c LocPixmap.c
OBJS = gram.o lex.o deftwmrc.o add_window.o gc.o list.o twm.o \
parse.o menus.o events.o resize.o util.o version.o iconmgr.o \
cursor.o icons.o vdt.o move.o LocPixmap.o
AllTarget(piewm ssetroot)
SpecialObjectRule(parse.o, vdt.c, '-DPIEWMDIR="$(PIEWMDIR)"')
SpecialObjectRule(vdt.o, vdt.c, $(XLOADIM_DEF))
#if !HasPutenv
SpecialObjectRule(util.o, ,-DNOPUTENV)
#endif
depend:: lex.c gram.c deftwmrc.c
ComplexProgramTarget(piewm)
NormalProgramTarget(ssetroot,ssetroot.o,,$(LOCAL_LIBRARIES),)
MakeDirectories(install,$(TWMDIR))
InstallNonExec(system.twmrc,$(TWMDIR))
# InstallNamedProg(ssetroot,xsetroot,$(BINDIR))
gram.h gram.c: gram.y
$(YACC) $(YFLAGS) gram.y
$(MV) y.tab.c gram.c
$(MV) y.tab.h gram.h
clean::
$(RM) y.tab.h y.tab.c lex.yy.c gram.h gram.c lex.c deftwmrc.c
deftwmrc.c: system.twmrc
$(RM) $@
@echo '/* ' >>$@
@echo ' * This file is generated automatically from the default' >>$@
@echo ' * twm bindings file system.twmrc by the twm Imakefile.' >>$@
@echo ' */' >>$@
@echo '' >>$@
@echo 'char *defTwmrc[] = {' >>$@
sed -e '/^#/d' -e 's/"/\\"/g' -e 's/^/ "/' -e 's/$$/",/' \
system.twmrc >>$@
@echo ' (char *) 0 };' >>$@