GNUmakefile
2.2 KB
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
#
# Makefile for unix version of ide
#
include $(ROOT)/usr/include/make/commondefs
CC=$(HOST_CC)
CVERSION=
GCINCS=-D_LANGUAGE_C -I$(ROOT)/host_include
YFLAGS=-p yy
LCDEFS = -Dident=undef
#
# Use $(MAKE) $(MAKEARGS) instead of $(MAKEF) so that make -n works
# This gets around the fact that $(MAKE) works and $(MAKEF) does not.
# MAKEARGS is based directly on $(MAKEF) in commondefs.
#
MAKEARGS = VCFLAGS="$(VCFLAGS)" VFFLAGS="$(VFFLAGS)" \
VPFLAGS="$(VPFLAGS)" VMKDEPFLAGS="$(VMKDEPFLAGS)"
#
# For $(INSTALL) the following "-idb" arguments are used in this tree:
# pr.sw.diag for diagnostics
#
IDBTAG_DIAGS = pr.sw.diag
LIBIDE= libide.a
DIAGCMD=diagcmd
LCOPTS= -g3
#STDINC= $(ROOT)/usr/include
STDINC= /usr/include
IDEINC= $(ROOT)/usr/include/ide
LCINCS= -I$(IDEINC) -I$(STDINC)
OBJS = \
ide_alloc.o \
ide_cmds.o \
ide_env.o \
ide_errlog.o \
ide_gram.o \
ide_init.o \
ide_lex.o \
ide_main.o \
ide_run.o \
ide_startup.o \
ide_sym.o \
$(DIAGCMD).o
default all: $(LIBIDE)
install: $(LIBIDE)
$(LIBIDE): $(OBJS)
$(AR) -ruv $(LIBIDE) $(OBJS)
clean:
rm -f $(OBJS) $(DIAGCMD).c ide_gram.c ide_gram.h ide_startup.c
clobber:clean
rm -f $(LIBIDE) Makedepend
$(DIAGCMD).o: \
$(DIAGCMD).c \
$(IDEINC)/ide.h
$(DIAGCMD).c: $(DIAGCMD).awk
$(NAWK) -v FILENAME=$(DIAGCMD).awk -F'\t[\t ]*' -f builtins.awk $(DIAGCMD).awk > $(DIAGCMD).c
$(DIAGCMD):
;
ide_alloc.o: \
ide_alloc.c \
$(IDEINC)/ide.h
ide_cmds.o: \
ide_cmds.c \
$(IDEINC)/ide.h \
$(IDEINC)/diag.h \
$(IDEINC)/dbg_comm.h
ide_env.o: \
ide_env.c \
$(IDEINC)/ide.h \
$(IDEINC)/diag.h \
$(IDEINC)/dbg_comm.h
ide_errlog.o: \
ide_errlog.c \
$(IDEINC)/diag.h
ide_gram.o: \
ide_gram.c \
$(IDEINC)/ide.h
ide_init.o: \
ide_init.c \
$(IDEINC)/diag.h
ide_lex.o: \
ide_lex.c \
$(IDEINC)/ide.h \
ide_gram.h
ide_main.o: \
ide_main.c \
$(IDEINC)/ide.h
ide_run.o: \
ide_run.c \
$(IDEINC)/ide.h \
$(IDEINC)/diag.h
ide_startup.o: \
ide_startup.c
ide_sym.o: \
ide_sym.c \
$(IDEINC)/ide.h
ide_gram.c: \
ide_gram.h
ide_gram.h: \
ide_gram.y
$(YACC) -d ide_gram.y
mv y.tab.c ide_gram.c
cmp -s y.tab.h ide_gram.h || mv y.tab.h ide_gram.h
rm -f y.tab.h
ide_startup.c: \
unixstartup
sed 's/"/\\"/g' unixstartup | $(NAWK) -f startup.awk > ide_startup.c