summaryrefslogtreecommitdiff
path: root/zwgc/Imakefile
blob: fbe3895292f37104befa7b75beca809bdae1e95f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
/**/#	Copyright 1988 Massachusetts Institute of Technology.
/**/#
/**/#	For copying and distribution information, see the file
/**/#	"mit-copyright.h". 
/**/#
/**/#	$Source$
/**/#	$Author$
/**/#	$Id$
/**/#

SUBDIRS= Memory String Dictionary
#ifdef macII
LIBS2= -lc -lPW
#endif
LIBS = $(X11_LIB) $(ZEPHYR_LIB) $(KRB_LIB) $(DES_LIB) $(COMERR_LIB) -ltermcap \
	$(LIBS2)
LINTLIBS = $(X11_LINTLIB) $(ZEPHYR_LINTLIB) $(KRB_LINTLIB) $(DES_LINTLIB) \
	$(COMERR_LINTLIB) -ltermcap
SRCS = parser.y lexer.c node.c exec.c buffer.c main.c zephyr.c X_driver.c\
          substitute.c port.c xshow.c \
          mux.c eval.c subscriptions.c notice.c xcut.c regexp.c\
	  character_class.c text_operations.c file.c error.c variables.c\
	  formatter.c X_fonts.c X_gram.c tty_filter.c standard_ports.c\
	  xselect.c xmark.c xrevstack.c xerror.c
OBJS = parser.o lexer.o node.o exec.o buffer.o main.o zephyr.o X_driver.o\
          substitute.o port_dictionary.o port.o xshow.o pointer_dictionary.o\
          mux.o eval.o subscriptions.o notice.o xcut.o regexp.o\
	  character_class.o text_operations.o file.o error.o variables.o\
	  formatter.o X_fonts.o X_gram.o tty_filter.o standard_ports.o\
	  xselect.o xmark.o xrevstack.o xerror.o ulong_dictionary.o
HDRS = exec.h node.h zwgc.h parser.h port.h\
		xshow.h pointer.h substitute.h eval.h zephyr.h lexer.h\
		subscriptions.h notice.h regexp.h character_class.h\
		text_operations.h file.h error.h mux.h variables.h\
		formatter.h main.h\
		X_driver.h X_fonts.h X_gram.h xselect.h \
		buffer.h xmark.h xrevstack.h xerror.h ulong.h

LINCLUDES = -IMemory -IString -IDictionary
GENERATORS= ./generate_stack_instance stack.h

SRCDIR= ${SRCTOP}/zwgc
CONFIG_FILES= zwgc.desc  zephyr.vars zwgc_resources
CODE= ${GENERATORS} ${HDRS} ${SRCS} ${CONFIG_FILES} Imakefile

LIB=.
LIBRARIES = $(LIB)/String/new_string.o $(LIB)/Dictionary/string_dictionary.o\
            $(LIB)/Dictionary/string_dictionary_aux.o\
	    $(LIB)/Dictionary/int_dictionary.o\
	    $(LIB)/Memory/new_memory.o

GENERATED= port_dictionary.c port_dictionary.h \
	pointer_dictionary.c pointer_dictionary.h \
	ulong_dictionary.c ulong_dictionary.h \
	char_stack.h \
	string_stack.h \
	xmode_stack.h \
	y.tab.h
	

DEPENDSRCS= ${CODE} ${GENERATED}

/*
 * The pathnames for the installed default description file & applications
 * default file.
 */
ZWGCDESC=$(ACLDIR)/zwgc.desc
APPDEF=$(ACLDIR)/zwgc_resources

DEFINES=-DREVSTACK -DDEFDESC=\"$(ZWGCDESC)\" -DAPPDEFDATABASE=\"$(APPDEF)\" \
	-DZWGCPATH=\"$(CLIENTDIR)/zwgc\"

normal_obj_rule()

OUTPUT=zwgc

do_subdirs($(SUBDIRS)) /* gotta do the subdirs first! */

program($(OUTPUT),$(OBJS),,$(LIBRARIES) $(LIBS),$(CLIENTDIR))

#ifdef ATHENA_COMPAT
/* On Athena, zwgc has been in /usr/etc on VAXes and RTs and some people
   run in with a full pathname.  For compatbility, install a link. */
install::
	$(RM) $(DESTDIR)$(USRETCDIR)/zwgc
	ln $(DESTDIR)$(CLIENTDIR)/zwgc $(DESTDIR)$(USRETCDIR)/zwgc || ln -s $(CLIENTDIR)/zwgc $(DESTDIR)$(USRETCDIR)/zwgc 
#endif

depend:: ${DEPENDSRCS}
	
install::
	$(RM) $(DESTDIR)$(ACLDIR)/zwgc.desc
	$(CP) zwgc.desc $(DESTDIR)$(ACLDIR)/zwgc.desc
	$(CHMOD) 644 $(DESTDIR)$(ACLDIR)/zwgc.desc
	$(RM) $(DESTDIR)$(ETCATHDIR)/zephyr.vars
	$(CP) zephyr.vars $(DESTDIR)$(ETCATHDIR)/zephyr.vars
	$(RM) $(DESTDIR)$(ACLDIR)/zwgc_resources
	$(CP) zwgc_resources $(DESTDIR)$(ACLDIR)/zwgc_resources

YFLAGS=-d

y.tab.h: parser.o
# use implicit yacc rule for the following:
parser.o: parser.y

#
# /* How to generate a port dictionary: */
#
port_dictionary.c port_dictionary.h: Dictionary/dictionary.c Dictionary/dictionary.h
	Dictionary/generate_dictionary_instance ${SRCDIR}/Dictionary port port.h

#
# /* How to generate a pointer dictionary: */
#
pointer_dictionary.c pointer_dictionary.h: Dictionary/dictionary.c Dictionary/dictionary.h
	Dictionary/generate_dictionary_instance ${SRCDIR}/Dictionary pointer pointer.h

#
# /* How to generate a ulong dictionary: */
#
ulong_dictionary.c ulong_dictionary.h: Dictionary/dictionary.c Dictionary/dictionary.h
	Dictionary/generate_dictionary_instance ${SRCDIR}/Dictionary ulong ulong.h

#
# /* How to generate a char stack: */
#
char_stack.h: stack.h
	./generate_stack_instance ${SRCDIR} char
#
# /* How to generate a string stack: */
#
string_stack.h: stack.h
	./generate_stack_instance ${SRCDIR} string
#
# /* How to generate a xmode stack: */
#
xmode_stack.h: stack.h
	./generate_stack_instance ${SRCDIR} xmode