home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1993 #2
/
Image.iso
/
os2
/
gtak212b.zip
/
SOURCE.ZIP
/
1.10
/
makefile.os2
< prev
next >
Wrap
Makefile
|
1992-09-29
|
11KB
|
355 lines
###############################################################################
# $Id: makefile.os2,v 1.3 1992/09/29 09:55:53 ak Exp $
###############################################################################
# $Log: makefile.os2,v $
# Revision 1.3 1992/09/29 09:55:53 ak
# K.U.R., once again :-)
# - removed a dup() in buffer.c
# - EMX opendir with hidden/system test in gnu.c (...dotdot)
#
# Revision 1.2 1992/09/18 16:43:30 ak
# *** empty log message ***
#
# Revision 1.1 1992/09/18 08:59:09 ak
# Initial revision
#
###############################################################################
# Makefile for GNU tar program.
# In order to disable remote-tape support, add -DNO_REMOTE to the
# appropriate DEFS line, and remove rtape_lib.* from LOCAL_{SRC,OBJ}
# For Ultrix 3.1, you will have to compile rtape_lib.c with -DUSG.
# Add -DUSE_REXEC to use rexec for remote tape operations
# instead of forking rsh or remsh.
#
# If tar fails to properly print error msgs, or core-dumps doing same,
# you may need to change which version of msg...() you are using.
# To do so, add one of the following to your DEFS= line
# -DSTDC_MSG If you are using an ANSI compiler, and have vfprintf().
# -DVARARGS_MSG If you have varargs.h and vfprintf()
# -DDOPRNT_MSG If you have _doprnt(), and no useful varargs support
# -DLOSING_MSG If nothing else works.
#
# Some non-BSD systems may have to add -DNEED_TZSET in order to have getdate.y
# compile correctly.
#
# If you have a system V system which defines size_t, add -DHAVE_SIZE_T.
# If you have a system which defines strstr, add -DHAVE_STRSTR.
#
# If you can't use remote tar with the rmt library, you can still get
# some stuff to work right by adding -DUSE_REXEC.
#
# Some people's systems define a prototype for signal handlers which
# require them to be declared as void. If you get such problems in
# rtape_lib, function command, then define -DSIGNAL_VOID.
#
# getdate.y has 8 shift/reduce conflicts.
#
# In addition to setting DEFS appropriately for your system, you might
# have to hand edit the #defines and #undefs in port.c.
INCLUDE = -I. -I../tape -I../libx
bindir = $(ROOTDIR)/usr/bin32
## GTAK version, emx-0.8e
usage:
@echo "Make target: release or debug"
release:
$(MAKE) -f Makefile.os2 all CC="gcc -O -Zomf" LDFLAGS="-Zsys" O="obj"
debug:
$(MAKE) -f Makefile.os2 all CC="gcc -g" LDFLAGS="" O="o"
DEFS = -DMSDOS -DNONAMES -DOS2=2 -DTAPE_IO $(INCLUDE)
LOCAL_SRC = ak_dir.c ak_tape.c tape.c scsitape.c errtab.c \
inherit.c os2ea_ld.c dosname.c
LOCAL_OBJ = ak_dir.$O ak_tape.$O tape.$O scsitape.$O errtab.$O getdate.$O \
inherit.$O os2ea_ld.$O dosname.$O
LIBS = -los2 tar.def
LINT = lint
LINTFLAGS = -abchx
DEFBLOCKING = 20
## Berserkeley version
#CC=gcc
#DEFS = -DBSD42
#LOCAL_SRC = getdate.y rtape_lib.c
#LOCAL_OBJ = getdate.$O rtape_lib.$O
#LDFLAGS =
#LIBS =
#LINT = lint
#LINTFLAGS = -abchx
#DEF_AR_FILE = \"/dev/rmt8\"
#DEFBLOCKING = 20
#O = o
## Ultrix
#CC=gcc
#DEFS = -DBSD42 -DSIGNAL_VOID
#LOCAL_SRC = getdate.y rtape_lib.c
#LOCAL_OBJ = getdate.$O rtape_lib.$O
#LDFLAGS =
#LIBS =
#LINT = lint
#LINTFLAGS = -abchx
#DEF_AR_FILE = \"/dev/rmt8\"
#DEFBLOCKING = 20
#O = o
# HPUX 7.0 version
#DEFS = -DBSD42 -Dhpux -DVARARGS_MSG
#LOCAL_SRC = getdate.y rtape_lib.c
#LOCAL_OBJ = getdate.$O rtape_lib.$O alloca.$O
#LDFLAGS =
#LIBS = -lBSD
#LINT = lint
#LINTFLAGS = -abchx
#DEF_AR_FILE = \"/dev/rct/c3d0s2\"
#DEFBLOCKING = 20
#O = o
# IBM AIX version -- this saves "hidden" directories, but doesn't restore
# them as hidden. Add -Di386 for a PS/2. If you don't have GCC, turn it off.
# Some people think you need -lbsd, some don't. Dunno.
#CC=gcc
#DEFS= -DUSG -Daix -DSTDC_MSG -DHAVE_MTIO -DHAVE_SIZE_T -DSIGNAL_VOID
#LOCAL_SRC = getdate.y rtape_lib.c
#LOCAL_OBJ = getdate.$O rtape_lib.$O
#LDFLAGS =
#LIBS = -lbsd
#LINT = lint
#LINTFLAGS = -p
#DEF_AR_FILE = \"/dev/rmt0\"
#DEFBLOCKING = 20
#O = o
# USG version
# Add -DNDIR to DEFS if your system uses ndir.h instead of dirent.h
# Add -DDIRECT to DEFS if your system uses 'struct direct' instead of
# 'struct dirent' (this is the case at least with one add-on ndir
# library)
# Add -DHAVE_MTIO to DEFS if your system has sys/mtio.h and defines MTIOCTOP
# Add -DDAYLIGHT_MISSING to DEFS if your system doesn't define the
# external variable `daylight'.
# Add -lndir to LIBS if your ndir routines aren't in libc.a
# Add -lPW to LIBS if you don't compile with gcc (to get alloca)
#DEFS = -DUSG -DSIGNAL_VOID #-DNDIR -DDIRECT -DHAVE_MTIO
#LOCAL_SRC = getdate.y rtape_lib.c
#LOCAL_OBJ = getdate.$O rtape_lib.$O
#LDFLAGS =
#LIBS = #-lndir -lPW
#LINT = lint
#LINTFLAGS = -p
#DEF_AR_FILE = \"/dev/rmt8\"
#DEFBLOCKING = 20
#O = o
# UniSoft's Uniplus SVR2 with NFS
#DEFS = -DUSG -DUNIPLUS -DNFS -DSVR2 -DSIGNAL_VOID
#LOCAL_SRC = getdate.y rtape_lib.c
#LOCAL_OBJ = getdate.$O rtape_lib.$O
#LDFLAGS =
#LIBS = -lndir
#LINT = lint
#LINTFLAGS = -bx
#DEF_AR_FILE = \"/dev/rmt8\"
#DEFBLOCKING = 20
#O = o
# MASSCOMP version
#CC = ucb cc
#DEFS = -DBSD42
#LOCAL_SRC = getdate.y rtape_lib.c
#LOCAL_OBJ = getdate.$O rtape_lib.$O
#LDFLAGS =
#LIBS =
#LINT = lint
#LINTFLAGS = -bx
#DEF_AR_FILE = \"/dev/rmt0\"
#DEFBLOCKING = 20
#O = o
# (yuk) MS-DOS (Microsoft C 4.0) version
#MODEL = S
#DEFS = -DNONAMES -A$(MODEL) -DNO_REMOTE
#LOCAL_SRC = getdate.y rtape_lib.c
#LOCAL_OBJ = getdate.$O rtape_lib.$O
#LDFLAGS =
#LIBS = $(MODEL)dir.lib
#LINT = $(CC)
#LINTFLAGS = -W3
#DEF_AR_FILE = \"tar.out\"
#DEFBLOCKING = 20
#O = obj
# V7 version
# Pick open3 emulation or nonexistence. See open3.h, port.c.
##DEFS = -DV7 -DEMUL_OPEN3 -Dvoid=int
##DEFS = -DV7 -DNO_OPEN3 -Dvoid=int
#LOCAL_SRC = getdate.y rtape_lib.c
#LOCAL_OBJ = getdate.$O rtape_lib.$O
#LDFLAGS =
#LIBS = -lndir
#LINT = lint
#LINTFLAGS = -abchx
#DEF_AR_FILE = \"/dev/rmt8\"
#DEFBLOCKING = 20
#O = o
# Minix version
# No lint, so no lintflags. Default file is stdin/out. (Minix "tar"
# doesn't even take an "f" flag, it assumes argv[2] is the archive name!)
# Minix "make" doesn't expand macros right, so Minix users will have
# to expand CFLAGS, SRCS, O, etc by hand, or fix your make. Not my problem!
# You'll also need to come up with ctime(), the directory
# library, and a fixed doprintf() that handles %*s. Put this stuff in
# the "SUBSRC/SUBOBJ" macro below if you didn't put it in your C library.
# Note that Minix "cc" produces ".s" files, not .o's, so O = s has been set.
#
# Pick open3 emulation or nonexistence. See open3.h, port.c.
##DEFS = -DV7 -DMINIX -DEMUL_OPEN3
##DEFS = -DV7 -DMINIX -DNO_OPEN3
#LOCAL_SRC = getdate.y rtape_lib.c
#LOCAL_OBJ = getdate.$O rtape_lib.$O
#LDFLAGS =
#LIBS =
#DEF_AR_FILE = \"-\"
#DEFBLOCKING = 8 # No good reason for this, change at will
#O = s
# Xenix version
#DEFS = -DUSG -DXENIX -DSIGNAL_VOID
#LOCAL_SRC = getdate.y rtape_lib.c
#LOCAL_OBJ = getdate.$O rtape_lib.$O
#LDFLAGS =
#LIBS = -lx
#LINT = lint
#LINTFLAGS = -p
#DEF_AR_FILE = \"/dev/rmt8\"
#DEFBLOCKING = 20
#O = o
# SGI 4D version
# You will need to define NEED_TZSET in getdate.y
#DEFS = -DUSG -I/usr/include/bsd
#LOCAL_SRC = getdate.y rtape_lib.c
#LOCAL_OBJ = getdate.$O rtape_lib.$O
#LDFLAGS =
#LIBS = -lxmalloc
#LINT = lint
#LINTFLAGS = -p
#DEF_AR_FILE = \"/dev/tape\"
#DEFBLOCKING = 20
#O = o
#CC = gcc
#TARGET_ARCH =
CFLAGS = $(ALLDEFS)
ALLDEFS = $(DEFS) \
-DDEFBLOCKING=$(DEFBLOCKING)
##AK -DDEF_AR_FILE=$(DEF_AR_FILE)
# Add things here like readdir that aren't in your standard libraries.
# (E.g. MSDOS needs msd_dir.c, msd_dir.obj)
SUBSRC=
SUBOBJ=
# Destination directory and installation program for make install
INSTALL = cp
RM = rm
SRC1 = tar.c create.c extract.c buffer.c getoldop.c update.c gnu.c mangle.c
SRC2 = version.c list.c names.c diffarch.c port.c wildmat.c getopt.c getopt1.c
SRC3 = $(LOCAL_SRC) $(SUBSRC)
SRCS = $(SRC1) $(SRC2) $(SRC3)
OBJ1 = tar.$O create.$O extract.$O buffer.$O getoldop.$O list.$O update.$O
OBJ2 = version.$O names.$O diffarch.$O port.$O wildmat.$O getopt.$O getopt1.$O
OBJ3 = gnu.$O mangle.$O $(LOCAL_OBJ) $(SUBOBJ)
OBJS = $(OBJ1) $(OBJ2) $(OBJ3)
# AUX = README PORTING Makefile TODO tar.h port.h open3.h \
# msd_dir.h msd_dir.c
AUX = README COPYING ChangeLog Makefile tar.texinfo tar.h port.h open3.h \
rmt.h msd_dir.h msd_dir.c rtape_server.c rtape_lib.c getdate.y \
getopt.h regex.h level-0 level-1 backup-specs testpad.c
.c.$O:
$(CC) $(CFLAGS) -c $<
all: tar$E
tar$E: $(OBJS)
$(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
rmt$E: rtape_server.c
$(CC) $(CFLAGS) $(LDFLAGS) -o rmt rtape_server.c
#testpad.h: testpad$E
# testpad > testpad.h
testpad$E: testpad.o
$(CC) -o $@ testpad.o
# command is too long for Messy-Dos (128 char line length limit) so
# this kludge is used...
# @echo $(OBJ1) + > command
# @echo $(OBJ2) >> command
# link @command, $@,,$(LIBS) /NOI;
# @$(RM) command
install: all
$(RM) $(bindir)/tar$E
$(INSTALL) tar$E $(bindir)/
lint: $(SRCS)
$(LINT) $(LINTFLAGS) $(ALLDEFS) $(SRCS)
TAGS: $(SRCS)
etags $(SRCS)
clean:
$(RM) errs $(OBJS) tar rmt testpad.o testpad testpad.h
distclean: clean
realclean: clean
shar: $(SRCS) $(AUX)
shar $(SRCS) $(AUX) | compress > tar-`sed -e '/version_string/!d' -e 's/[^0-9.]*\([0-9.]*\).*/\1/' -e q version.c`.shar.Z
dist: $(SRC1) $(SRC2) $(AUX)
echo tar-`sed -e '/version_string/!d' -e 's/[^0-9.]*\([0-9.]*\).*/\1/' -e q < version.c` > .fname
-rm -rf `cat .fname`
mkdir `cat .fname`
ln $(SRC1) $(SRC2) $(AUX) `cat .fname`
tar chZf `cat .fname`.tar.Z `cat .fname`
-rm -rf `cat .fname` .fname
tar.zoo: $(SRCS) $(AUX)
-mkdir tmp.dir
-rm tar.zoo
for X in $(SRCS) $(AUX) ; do echo $$X ; sed 's/$$//' $$X > tmp.dir/$$X ; done
cd tmp.dir ; zoo aM ../tar.zoo *
-rmdir tmp.dir
$(OBJS): tar.h port.h testpad.h
regex.$O tar.$O: regex.h
tape.$O: ../tape/tape.c
$(CC) $(CFLAGS) -o $@ -c $<
scsitape.$O: ../tape/scsitape.c
$(CC) $(CFLAGS) -o $@ -c $<
errtab.$O: ../tape/errtab.c
$(CC) $(CFLAGS) -o $@ -c $<
dirent.$O: ../libx/dirent.c
$(CC) $(CFLAGS) -o $@ -c $<
inherit.$O: ../libx/inherit.c
$(CC) $(CFLAGS) -o $@ -c $<
os2ea_ld.$O: ../libx/os2ea_ld.c
$(CC) $(CFLAGS) -o $@ -c $<
os2ea_op.$O: ../libx/os2ea_op.c
$(CC) $(CFLAGS) -o $@ -c $<
dosname.$O: ../libx/dosname.c
$(CC) $(CFLAGS) -o $@ -c $<