home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 October
/
usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso
/
unix
/
volume26
/
maint
/
part01
/
Makefile.dist
< prev
next >
Wrap
Makefile
|
1992-05-13
|
4KB
|
124 lines
################################################################################
#
# Installation: Western Michigan University Academic Computer Center
#
# System: Software Tools
#
# Program: maint
#
# Version=01 Level=00 05/31/90 Leonard J. Peirce
#
# Purpose: Makefile for building maint.
#
# Syntax: % make to build maint
# % make install to install maint
#
# Other: (C) Copyright 1992, Leonard J. Peirce
#
###############################################################################
# INSTRUCTIONS:
#
# Pick the correct CC, LIB, and CFLAGS for your site from the examples below.
# Default values are provided and might be pretty good choices if you're not
# sure what to use. Also, set BINDIR, BINMODE, etc., if you want to use
# the makefile to install maint for you. HELPFILE has a default below but
# you should make sure it's correct.
# SunOS:
# The System V stuff must be installed because maint needs the System V
# curses.h and curses and termcap libraries; Terminfo must also be installed;
# gcc can be used but CFLAGS must be modified to include -I/usr/5include and
# and LFLAGS must be modified to pick up the curses and termcap libraries in
# /usr/5lib;
# Also, if you are running SunOS 3.X, you need to add -DSUNOS3 to CFLAGS.
# Examples:
# The following works with the System V C compiler:
#
#CC = /usr/5bin/cc
#DEBUGOPT = -O4
#CFLAGS = $(DEBUGOPT) -c -DHELPFILE=\"${HELPDIR}/maint.help\"
#LIBS = -lcurses -ltermcap
#
# If you want to use gcc, you might try:
#
#CC = gcc
#DEBUGOPT = -O
#CFLAGS = -I/usr/5include $(DEBUGOPT) -c -DHELPFILE=\"${HELPDIR}/maint.help\"
#LIBS = /usr/5lib/libcurses.a /usr/5lib/libtermcap.a
# ULTRIX:
# ULTRIX needs -lcursesX; realize that maint will only build for ULTRIX 3.0+;
# the curses library in the older versions won't work
# ULTRIX sites can also use vcc or gcc for the C compiler
CC = cc
DEBUGOPT = -O
CFLAGS = $(DEBUGOPT) -c -DHELPFILE=\"${HELPDIR}/maint.help\"
LIBS = -lcursesX -ltermcap
# System V:
# Haven't done much testing in this environment. It worked fine the last
# time someone tested it for me (System V Release 3 on a 3b2)
#CC = cc
#DEBUGOPT = -O
#CFLAGS = -DMAXPATHLEN=1024 -DSYSV $(DEBUGOPT) -c -DHELPFILE=\"${HELPDIR}/maint.help\"
#LIBS = -lcurses -ltermcap
# Set these if you want to use the Makefile to install maint for you
#
# BINDIR - where the executable will live
# BINMODE - protection mode for the executable
# MANDIR - where the man page will live
# MANMODE - protection mode for the man page
# HELPDIR - where the on-line help file will live
# HELPMODE - protection mode for help file
# OWNER - of executable, the man page, and the help file
# GROUP - ditto
BINDIR = /usr/local/bin
BINMODE = 755
MANDIR = /usr/local/man/man1
MANMODE = 644
HELPDIR = /usr/local/lib
HELPMODE = 644
OWNER = root
GROUP = daemon
# End of configuration section
LDFLAGS = $(DEBUGOPT)
OBJECTS = main.o args.o edit.o help.o info.o locate.o mark.o mem.o\
misc.o options.o pool.o screen.o select.o slot.o sort.o text.o\
xecute.o
SOURCES = main.c args.c edit.c help.c info.c locate.c mark.c mem.c\
misc.c options.c pool.c screen.c select.c slot.c sort.c text.c\
xecute.c
INCLUDES = maint.h
LINTFLAGS = -chxz
maint: ${OBJECTS}
${CC} ${LDFLAGS} ${OBJECTS} ${LIBS} -o maint
${OBJECTS}: ${INCLUDES}
.c.o:
${CC} ${CFLAGS} $*.c
clean:
-rm -f *.o core a.out
lint:
-lint ${LINTFLAGS} ${SOURCES} >lint.out
tags: ${SOURCES} ${INCLUDES}
ctags -t *.[ch]
install: maint
install -c -m ${BINMODE} -o ${OWNER} -g ${GROUP} maint ${BINDIR}
install -c -m ${MANMODE} -o ${OWNER} -g ${GROUP} maint.1 ${MANDIR}
install -c -m ${HELPMODE} -o ${OWNER} -g ${GROUP} maint.hlp ${HELPDIR}