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
|
DESTDIR = /usr/local
# Makefile for srdp/utalk - Roger Espel Llima
BINDIR = $(DESTDIR)$(prefix)/bin
MANDIR = $(DESTDIR)$(prefix)/share/man
LIBDIR = $(DESTDIR)$(prefix)/lib
SRCS = srdp.c utalk.c util.c termcap.c termio.c globals.c signal.c screen.c\
functions.c kbd.c comm.c rc.c menu.c
OBJS = srdp.o utalk.o util.o termcap.o termio.o globals.o signal.o screen.o\
functions.o kbd.o comm.o rc.o menu.o
HEADS = comm.h kbd.h signal.h struct.h util.h functions.h rc.h srdp.h\
termcap.h globals.h screen.h srdpdata.h termio.h menu.h
# The termcap library; -ltermcap does the job on most systems (e.g. BSDs),
# but if you have ncurses installed you may want to change it to -lncurses
# (mostly on Linux)
# On some systems without a separate termcap library but with termcap
# emulation in curses, you may need to set it to -lcurses.
LIBS = -lncurses
# Extra libraries; uncomment this for Solaris, change it for other machines
# EXTRALIBS = -lsocket -lnsl
# Uncomment this on non-POSIX BSD machines (NeXT, Sequent...) if you
# have trouble compiling without it.
# OPT1 = -DUSE_SGTTY
# OPT2 = -DUSE_SIGVEC
# Uncomment this if you have trouble compiling because of sigaction()
# and USE_SIGVEC doesn't work:
# OPT3 = -DNO_SIGACTION
# Uncomment this if you want eight-bit-stripping on by default
# OPT4 = -DSEVEN_BIT
OPT5 = -DLIBDIR="\"$(LIBDIR)\""
OPTS = $(OPT1) $(OPT2) $(OPT3) $(OPT4) $(OPT5)
#CFLAGS = -g -O -D__USE_FIXED_PROTOTYPES__ $(OPTS)
#CFLAGS = -g -Wall -DDEBUG -D__USE_FIXED_PROTOTYPES__ $(OPTS)
CFLAGS = -O2 -g -Wall -D__USE_FIXED_PROTOTYPES__ $(OPTS)
#LDFLAGS = -g
CC = gcc
ROFF = nroff
STRIP ?= strip
all: utalk
utalk.cat: utalk.1
$(ROFF) -man utalk.1 > utalk.cat
utalk: $(OBJS)
$(CC) $(LDFLAGS) -o utalk $(OBJS) $(LIBS) $(EXTRALIBS)
test: stest.o srdp.o
$(CC) $(LDFLAGS) -o stest stest.o $(LIBS) $(EXTRALIBS)
install: utalk utalk.1
$(STRIP) utalk
mkdir -p $(BINDIR)
mkdir -p $(MANDIR)
mkdir -p $(MANDIR)/man1
cp utalk $(BINDIR)
# chown root:root $(BINDIR)/utalk
cp utalk.1 $(MANDIR)/man1
# chown root:root $(MANDIR)/man1/utalk.1
# cp utalk.help $(LIBDIR)
# chmod 644 $(LIBDIR)/utalk.help
uninstall:
rm -f $(BINDIR)/utalk
rm -f $(MANDIR)/man1/utalk.1
clean:
rm -f $(OBJS) stest.o stest utalk core
depend:
makedepend -- $(CFLAGS) -- $(SRCS)
|