File: Makefile

package info (click to toggle)
ng 1.4.3.1-2
  • links: PTS
  • area: main
  • in suites: woody
  • size: 2,540 kB
  • ctags: 3,967
  • sloc: ansic: 40,681; asm: 3,150; cpp: 1,243; makefile: 526; sh: 67
file content (167 lines) | stat: -rw-r--r-- 3,970 bytes parent folder | download | duplicates (3)
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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
# $Id: Makefile,v 1.2 2000/09/30 15:59:42 amura Exp $
# Makefile for MicroEMACS.
# Is there a better way to do the rebuilds, other than using
# the links?
#
# $Log: Makefile,v $
# Revision 1.2  2000/09/30 15:59:42  amura
# add Canna configuration form config.h
#
# Revision 1.1.1.1  2000/06/27 01:47:59  amura
# import to CVS
#
# Modified for Ng 1.0	by Shigeki Yoshida (shige@csk.CO.JP)	1990.01.29

SYS	= sysv

# Canna configurations
#CANNADEF = -DCANNA
#CANNALIB = -L/usr/share/lib -lcanna
#CANNAINC = -I/usr/share/include
CANNADEF =
CANNALIB =
CANNAINC =

# CDEFS gets defines, and gets passed to lint. CFLAGS gets flags, and doesn't
# get passed to lint.
#
# Now, compile time options are defined in a "config.h".
#
CDEFS	= $(CANNADEF)
CFLAGS	= -O $(CDEFS) $(CANNAINC)

# If your machine have an alloca() in a libPW.a, please add -lPW to the LIBS.
#LIBS	= $(CANNALIB) -lcurses -lPW
LIBS	= $(CANNALIB) -lcurses 

# If your machine don't have an alloca(), please define ALLOCA.
#ALLOCA	= alloca.o
ALLOCA	=

CC	= cc

# Objects which only depend on the "standard" includes
OBJS	= basic.o dir.o dired.o shell.o version.o window.o \
	  kinsoku.o jump.o

# Those with unique requirements
IND	= buffer.o complt.o display.o cmode.o echo.o extend.o file.o \
	  help.o kbd.o keymap.o line.o macro.o main.o match.o modes.o \
	  paragraph.o random.o region.o regex.o re_search.o search.o \
	  skg.o kanji.o undo.o word.o

# System dependent objects
OOBJS = cinfo.o spawn.o ttyio.o tty.o ttykbd.o

OBJ = $(OBJS) $(IND) $(OOBJS) fileio.o canna.o $(ALLOCA)

OSRCS	= cinfo.c fileio.c spawn.c ttyio.c tty.c ttykbd.c canna.c alloca.c
SRCS	= basic.c cmode.c dir.c dired.c file.c line.c match.c paragraph.c \
	  random.c region.c search.c shell.c version.c window.c word.c \
	  buffer.c complt.c display.c echo.c extend.c help.c kbd.c \
	  keymap.c macro.c main.c modes.c regex.c re_search.c kanji.c \
	  kinsoku.c skg.c jump.c undo.c

OINCS =	ttydef.h sysdef.h chrdef.h
INCS =	config.h def.h
REINCS = regex_e.h regex_j.h regex_j.c regex_e.h kanji_.h kanji_.c

#PROG = mg
PROG = ng

$(PROG):	$(OBJ)
	$(CC) $(CFLAGS) -o $(PROG) $(OBJ) $(LIBS)

# strip mg once you're satisfied it'll run -- makes it much smaller
strip:
	strip $(PROG)

lint: $(SRCS) $(OSRCS) $(INCS) $(OINCS)
	lint -ahbz $(CDEFS) $(SRCS) $(OSRCS)

$(OBJ):		$(INCS) $(OINCS)

$(OOBJS):	$(INCS) $(OINCS)

buffer.o: 	$(INCS) $(OINCS) kbd.h undo.h

cmode.o file.o line.o paragraph.o random.o region.o undo.o word.o: \
		$(INCS) $(OINCS) undo.h

complt.o:	$(INCS) $(OINCS) kbd.h complt.h

display.o keymap.o modes.o fileio.o: \
		$(INCS) $(OINCS) kbd.h

echo.o:		$(INCS) $(OINCS) key.h macro.h complt.h

extend.o help.o: \
		$(INCS) $(OINCS) kbd.h macro.h key.h

kanji.o:	$(INCS) $(OINCS) kinit.h

kbd.o:		$(INCS) $(OINCS) kbd.h macro.h key.h undo.h

macro.o canna.o: \
		$(INCS) $(OINCS) macro.h key.h

main.o search.o: \
		$(INCS) $(OINCS) macro.h

match.o:	$(INCS) $(OINCS) key.h

re_search.o:	$(INCS) $(OINCS) $(REINCS) macro.h

regex.o:	$(INCS) $(OINCS) $(REINCS)

skg.o: 		$(INCS) $(OINCS) macro.h key.h undo.h

sysdef.h:	sys/$(SYS)/sysdef.h	# Update links, if needed.
	rm -f sysdef.h
	ln sys/$(SYS)/sysdef.h .

ttydef.h:	sys/default/ttydef.h
	rm -f ttydef.h
	ln sys/default/ttydef.h .

chrdef.h:	sys/default/chrdef.h
	rm -f chrdef.h
	ln sys/default/chrdef.h .

fileio.c:	sys/$(SYS)/fileio.c
	rm -f fileio.c
	ln sys/$(SYS)/fileio.c .

spawn.c:	sys/$(SYS)/spawn.c
	rm -f spawn.c
	ln sys/$(SYS)/spawn.c .

tty.c:		sys/default/tty.c
	rm -f tty.c
	ln sys/default/tty.c .

ttyio.c:	sys/$(SYS)/ttyio.c
	rm -f ttyio.c
	ln sys/$(SYS)/ttyio.c .

ttykbd.c:	sys/default/ttykbd.c
	rm -f ttykbd.c
	ln sys/default/ttykbd.c .

cinfo.c:	sys/default/cinfo.c
	rm -f cinfo.c
	ln sys/default/cinfo.c .

canna.c:	sys/default/canna.c
	rm -f canna.c
	ln sys/default/canna.c .

alloca.c:	sys/default/alloca.c
	rm -f alloca.c
	ln sys/default/alloca.c .

port: $(SRCS) $(INCS)
	rm -f port
	tar cfb port 1 $?

clean:;	rm -f $(OBJ) $(OSRCS) $(OINCS)