-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile.in
133 lines (103 loc) · 3.41 KB
/
Makefile.in
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
#
# @configure_input@
#
# Made by Matthieu Lucotte
# Login <gounter@users.sourceforge.net>
#
# Started on Thu Jun 29 19:04:08 2000 Matthieu Lucotte
# Last update Mon Sep 22 22:18:54 2003
#
#System specific vars
prefix = @prefix@
datarootdir = @datarootdir@
exec_prefix = @exec_prefix@
MAKE = @MAKE@
INSTALL = @INSTALL@
TAR = @TAR@
AR = @AR@
RANLIB = @RANLIB@
CC = @CC@
CFLAGS = @CFLAGS@ @DEFS@ @EXTRA_CFLAGS@
CPPFLAGS = @CPPFLAGS@
LIBS = @LIBS@ @EXTRA_LIBS@
LDFLAGS = @LDFLAGS@
EXTRA_DEPS = @EXTRA_DEPS@
#uncomment this for debug infos
#CFLAGS += -DDEBUG
# old stuff. safely ignore.
#
# uncomment this if your keyboard doesn't send combined key codes packed
# The ALT-1 key will not be detected in this case, unless DUMB_KEYBOARD
# is defined
#CFLAGS += -DDUMB_KEYBOARD
#End of system specific vars
NAME = zssh2
VERSION = @PACKAGE_VERSION@
PRGS = zssh2
MANS = $(PRGS:=.1)
# Files to be installed
FILES = $(PRGS) $(MANS)
SRC = completion.c doit.c escape.c escape_multi.c globbing.c init.c main.c misc.c openpty.c pc_test_escapes.c quote_removal.c signal.c split_words.c tilde_expansion.c util.c zmodem.c zmodem_act.c
OBJS = $(SRC:.c=.o)
INCL = config.h parse.h zssh.h
# archive and packaging stuff
# only used if you do a 'make rpm'
RPMDIR = /usr/src/redhat
# where to write archives
BACKDIR = ${HOME}/backup
# name of symlink to BACKDIR
BACKLINK = backup
# archives are chown-ed to BACKOWNER:BACKGROUP
BACKOWNER = 500
BACKGROUP = $(BACKOWNER)
TGZ = $(NAME)-$(VERSION).tgz
RPMSPEC = $(NAME).spec
RPMBUILDARCH = $(shell rpm --showrc | grep "^build arch" | cut -d: -f2 | xargs echo )
all: $(PRGS)
$(NAME) : $(EXTRA_DEPS) ${OBJS}
$(CC) -o $(NAME) $(LDFLAGS) $(OBJS) $(LIBS)
install : all
$(INSTALL) -m 0755 -d @bindir@
$(INSTALL) -m 0755 zssh @bindir@
$(INSTALL) -m 0755 -d @mandir@/man1
$(INSTALL) -m 0644 $(MANS) @mandir@/man1
uninstall :
-cd @bindir@ && rm $(PRGS)
-cd @mandir@/man1 && rm $(MANS)
fake_readline : FORCE
-cd fake_readline && $(MAKE)
# create source archive in ~/backup
tgz $(TGZ) : distclean FORCE
@cdir=`pwd` && cdir=`basename $$cdir` && cd .. && \
echo "#################################################" && \
echo $(TAR) -cvzf "$(BACKDIR)/$(TGZ)" "$$cdir" && \
echo "#################################################" && echo -n "Press return" && read f && \
$(TAR) -cvzf "$(BACKDIR)/$(TGZ)" "$$cdir"
ln -sf $(BACKDIR) $(BACKLINK)
# create rpm and srpm
rpm : $(RPMSPEC)
@echo -n "Be sure to 'make tgz' before 'make rpm'. Usually must be root to succeed. Press return if ok" && read f
cp -f $(BACKLINK)/$(TGZ) $(RPMDIR)/SOURCES
rpm -ba $(RPMSPEC)
$(INSTALL) -o $(BACKOWNER) -g $(BACKGROUP) -m 600 $(RPMDIR)/RPMS/$(RPMBUILDARCH)/$(NAME)-$(VERSION)-1.$(RPMBUILDARCH).rpm $(BACKLINK)
$(INSTALL) -o $(BACKOWNER) -g $(BACKGROUP) -m 600 $(RPMDIR)/SRPMS/$(NAME)-$(VERSION)-1.src.rpm $(BACKLINK)
$(RPMSPEC) : $(RPMSPEC:.spec=.spec.tpl)
echo "%define ZSSHVER $(VERSION)" > $(RPMSPEC)
cat $(RPMSPEC:.spec=.spec.tpl) >> $(RPMSPEC)
fun.h : $(SRC)
protos -o fun.h $(SRC)
TAGS :
etags *.[ch]
new : clean all
clean :
-rm *.o *~ *.a \#*\# core $(PRGS) typescript nohup.out $(RPMSPEC) $(BACKLINK)
distclean : clean
-rm Makefile config.cache config.status config.log config.scan config.h TAGS
-(cd fake_readline && $(MAKE) distclean)
-(cd test && $(MAKE) distclean)
autoconf:
autoconf
autoheader
$(OBJS) : $(INCL)
.PHONY: distclean clean install uninstall rpm fake_readline
FORCE: