summaryrefslogtreecommitdiffstats
path: root/usr.bin/ncftp/Makefile.ORIG
blob: 7fe52b8bdcfe550782673a8e3a6dd3746d756d9b (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
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
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
# Makefile for ncftp
# 
# Major sections delimited by a dash lines.  If several lines set the same
# make variable, you can choose between the commented #samples, or just
# type what you want manually.
#--------------------------------------------------------------------------


# System dependent definitions.  See the README, part B.
#--------------------------------------------------------------------------
SDEFS = 


# Program definitions.  See the README, part C.
#--------------------------------------------------------------------------
PDEFS =
#PDEFS = -DGETLINE
#PDEFS = -DREADLINE -DCURSES
#PDEFS = -DSOCKS
#PDEFS = -DPASSIVEMODE
#PDEFS = -DDEBUG -DDB_ERRS


# Choose your compiler and flags below.  Make sure you use an ANSI compiler
# that handles new style function declarations and prototypes (gcc should).
#--------------------------------------------------------------------------
CC = cc
#CC = gcc

#CFLAGS = $(TERM_INC) -O
CFLAGS = $(TERM_INC) -O2
#CFLAGS = $(TERM_INC) -g

LFLAGS = -s
#LFLAGS =


# Additional libraries and/or object files.
# 
# For each library, add -lLIBNAME to the LIBS line below, for a library
#   named libLIBNAME.a.
#
# For each object file, just add the pathname of the object file.
#
# Some may need any of -lsocket, -lnet, -linet, -lintl, or -lnsl. 
# You'll need -lcurses or -ltermcap if CURSES is defined.
# You'll need -lreadline AND either -lcurses or -ltermcap if you
#   want to use the GNU Readline library.
# You'll need -lgetline (compile it as a library) if you want to use
#   getline.
# If your system is running Yellow Pages, you'll need to add the library
#   that has the YP/NIS version of getpwuid() in it (Important!)
# You'll need to know where the Rconnect.o object file is if you want
#   to use Socks.
#--------------------------------------------------------------------------
LIBS =
#LIBS = -ldbmalloc
#LIBS = -lgetline
#LIBS = -lreadline -lcurses
#LIBS = ../lib/Rconnect.o
#LIBS = -lnet -lnsl -lsocket -lcurses
#LIBS = -lcurses -ltermcap

# If the libraries are in a non-standard directory, or you if want to use
# getline or readline and they aren't installed system-wide, add the
# extra directories to look in here, using -L's.
#--------------------------------------------------------------------------
LIBDIRS =
#LIBDIRS = -L../getline
#LIBDIRS = -L../readline

# To make term sources define this to your term directory
TERM_INC = 
TERM_LIB = 
#TERM_INC = -include /usr/local/include/termnet.h
#TERM_LIB = -ltermnet

# Additional headers.
#
# If you defined READLINE or GETLINE, you have to tell where it's header
# file can be found.
#
# For READLINE, provide a path which would find <readline/readline.h>,
#   so you would put the parent directory of the readline directory below.
#   If you had '/usr/local/readline/readline.h' you would use
#   -I/usr/local.
#
# For GETLINE, a little different. Just supply a path that would find
#   <getline.h>.  If you had '/usr/local/getline/getline.h' you would use
#   -I/usr/local/getline.
#--------------------------------------------------------------------------
HDRDIRS =
#HDRDIRS = -I../getline
#HDRDIRS = -I..


# If you want to 'make install,' edit these variables, otherwise don't
# worry about it.
# To install MAN style pages, set MANDIR to the proper location.
# To install CATMAN style pages, set CATMANDIR, NROFF, and PACK to the proper
# locations.
# To inhibit the installation of either, unset MANDIR/CATMANDIR.
#--------------------------------------------------------------------------
#BINDIR = /usr/lbin
BINDIR = /usr/local/bin
MANDIR = /usr/man/man1
#MANDIR = 
#CATMANDIR = /usr/catman/LOCAL/g1
CATMANDIR =
NROFF	= /usr/ucb/nroff
PACK	= pack
TEST	= test
RM = rm -f
CP = cp
CAT = cat


#************************************************
#*** SHOULD NOT NEED TO EDIT BELOW THIS POINT ***
#************************************************

DEFS = $(PDEFS) $(SDEFS)
MK = $(CC) $(CFLAGS) $(DEFS) $(HDRDIRS) $(LFLAGS) $(LIBDIRS) $(LIBS)
 
SRCS = cmds.c cmdtab.c ftp.c ftprc.c getpass.c glob.c main.c open.c set.c \
tips.c util.c
  
HEADERS = cmds.h copyright.h defaults.h ftp.h ftprc.h getpass.h glob.h \
main.h open.h set.h sys.h util.h
   
OBJS = cmds.o cmdtab.o ftp.o ftprc.o getpass.o glob.o main.o open.o set.o \
tips.o util.o

NAME = ncftp
MAN = ncftp.1
CATMAN = ncftp.z
ALL = $(SRCS) $(HEADERS) patchlevel.h Blurb README Makefile $(MAN) \
v2_Note

C_COMPILE = $(CC) $(CFLAGS) $(DEFS) $(HDRDIRS)
C_COMPILE2 = $(CC) $(CFLAGS) $(DEFS) -DMK='"$(MK)"' $(HDRDIRS)

all: $(NAME) done

$(NAME): $(OBJS)
	$(CC) $(LFLAGS) $(LIBDIRS) $(OBJS)  -o $(NAME) $(LIBS) $(TERM_LIB)

install: $(NAME)
	if $(TEST) -f $(BINDIR)/term ; then \
		$(CP) $(BINDIR)/term $(BINDIR)/$(NAME) ; \
		$(CAT) $(NAME) > $(BINDIR)/$(NAME) ; \
	else \
	  $(CP) $(NAME) $(BINDIR)/$(NAME) ; \
	fi
	@if $(TEST) -n '$(MANDIR)'; then \
		$(MAKE) install_man ; else true ;  fi
	@if $(TEST) -n '$(CATMANDIR)'; then \
		$(MAKE) install_catman ; else true ;  fi

install_man: $(MAN)
	$(CP) $(MAN)  $(MANDIR)/$(MAN)


install_catman:  $(CATMAN)
	$(CP) $(CATMAN)  $(CATMANDIR)/$(CATMAN)

uninstall:
	$(RM) $(BINDIR)/$(NAME)
	$(RM) $(MANDIR)/$(MAN)
	$(RM) $(CATMANDIR)/$(CATMAN)

$(CATMAN): $(MAN)
	$(RM) tmp
	$(NROFF) -man -Tlp $(MAN) > tmp
	$(PACK) -f tmp
	mv tmp.z $(CATMAN)

cmds.o:
	$(C_COMPILE2) cmds.c -c

.c.o:
	$(C_COMPILE) -c $<

done: $(NAME)
	-@ls -l $(NAME)
	-@echo 'Done.'

clean:
	rm -f $(OBJS) $(NAME)

# Dependencies:
cmds.o: cmds.c 
cmds.o: sys.h 
cmds.o: util.h 
cmds.o: cmds.h 
cmds.o: main.h 
cmds.o: ftp.h 
cmds.o: ftprc.h 
cmds.o: getpass.h 
cmds.o: glob.h 
cmds.o: open.h 
cmds.o: set.h 
cmds.o: defaults.h 
cmds.o: copyright.h 
cmdtab.o: cmdtab.c 
cmdtab.o: sys.h 
cmdtab.o: util.h 
cmdtab.o: cmds.h 
cmdtab.o: main.h 
cmdtab.o: ftp.h 
cmdtab.o: ftprc.h 
cmdtab.o: glob.h 
cmdtab.o: open.h 
cmdtab.o: set.h 
cmdtab.o: copyright.h 
ftp.o: ftp.c 
ftp.o: sys.h 
ftp.o: util.h 
ftp.o: ftp.h 
ftp.o: cmds.h 
ftp.o: main.h 
ftp.o: ftprc.h 
ftp.o: getpass.h 
ftp.o: defaults.h 
ftp.o: copyright.h 
ftprc.o: ftprc.c 
ftprc.o: sys.h 
ftprc.o: util.h 
ftprc.o: ftprc.h 
ftprc.o: main.h 
ftprc.o: cmds.h 
ftprc.o: set.h 
ftprc.o: defaults.h 
ftprc.o: copyright.h 
getpass.o: getpass.c 
getpass.o: sys.h 
getpass.o: util.h 
getpass.o: cmds.h 
getpass.o: getpass.h 
getpass.o: copyright.h 
glob.o: glob.c 
glob.o: sys.h 
glob.o: util.h 
glob.o: glob.h 
glob.o: cmds.h 
glob.o: copyright.h 
main.o: main.c 
main.o: sys.h 
main.o: util.h 
main.o: cmds.h 
main.o: main.h 
main.o: ftp.h 
main.o: ftprc.h 
main.o: open.h 
main.o: set.h 
main.o: defaults.h 
main.o: copyright.h 
open.o: open.c 
open.o: sys.h 
open.o: util.h 
open.o: open.h 
open.o: cmds.h 
open.o: ftp.h 
open.o: ftprc.h 
open.o: main.h 
open.o: defaults.h 
open.o: copyright.h 
set.o: set.c 
set.o: sys.h 
set.o: util.h 
set.o: cmds.h 
set.o: main.h 
set.o: set.h 
set.o: defaults.h 
set.o: copyright.h 
tips.o: tips.c 
tips.o: sys.h 
tips.o: util.h 
util.o: util.c 
util.o: sys.h 
util.o: util.h 
util.o: cmds.h 
util.o: main.h 
util.o: ftp.h 
util.o: ftprc.h 
util.o: defaults.h 
util.o: copyright.h 
OpenPOWER on IntegriCloud