# Makefile for LHarc UNIX Archiver Driver
#               Copyright(C) MCMLXXXIX  Yooichi.Tagawa
# V0.01  Alpha Version                          1989.05.28  Y.Tagawa
# V0.02  Alpha Version R2                       1989.05.29  Y.Tagawa
# V0.03  Release #3  Beta Version               1989.07.02  Y.Tagawa
# V0.03b Modified                               1989.07.13  Y.Tagawa
# V1.00  Fixed                                  1989.09.19  Y.Tagawa
#
# for OSK
# V1.08                                         1990.10.09  Sakura Tomozou
# V2.00 + lzhuf4/5                              1990.10.26  
#
# LHa for UNIX
# V0.01  Alpha Version                          1991.10.17  Masaru Oki
# V0.02  Alpha Version Rel.2                    1991.11.26  Masaru Oki
# V0.03  Beta Version                           1991.12.03  Masaru Oki
# V0.04  Beta Version  Rel.2                    1992.01.17  Masaru Oki

#-----------------------------------------------------------------------
# CFLAGS macro definitions...
#-----------------------------------------------------------------------
# DIRECTORY ACCESS STUFF
#  The default (no need swtich) is your machine has
#  opendir(),readdir(),closedir() library and 'direct' structure used.
#  If your machine has no opendir (), readdir (), closedir ()
#       -DNONSYSTEM_DIR_LIBRARY
#  and add lhdir.o into OBJS macro (see bellow)
#  If your machine are 'dirent' (not 'direct') structure used,
#       -DSYSV_SYSTEM_DIR
#  Otherwise "Give up!"
#       -DNODIRECTORY
#
#-----------------------------------------------------------------------
# MEMORY ACCESS STUFF
#  Your machine has no BSTRING library (bcmp,bcopy,bzero).
#       -DNOBSTRING
#
#-----------------------------------------------------------------------
# TIME STUFF
#  Your include file '<sys/time.h>' has no 'struct tm',  define this.
#       -DSYSTIME_HAS_NO_TM
#  Your include file '<sys/time.h>' includes 'struct timeval', define this.
#       -DSYSTIME_HAS_TIMEVAL           Added by Bob Friesenhahn 4/23/92.
#
#-----------------------------------------------------------------------
# FILE I/O STUFF
#  Your machine has no ftruncate system-call, define this.
#       -DNOFTRUNCATE
#-----------------------------------------------------------------------
# STRING STUFF
#  Your machine has no strdup(), define this.
#     -DNOSTRDUP
#-----------------------------------------------------------------------
LFLAGS  = SMALLCODE BATCH 
STARTUP = LIB:c.o
LIBS    = LIB:sc.lib, LIB:amiga.lib, LIB:scm.lib    

LHOBJS          = lharc.o lhadd.o lhlist.o lhext.o header.o
HUFOBJS         = append.o crcio.o dhuf.o extract.o huf.o larc.o maketbl.o maketree.o shuf.o slide.o util.o
LIBRARYOBJS     = memmove.o strucmp.o patmatch.o strdup.o rename.o

SWITCHIES       = def=SYSV_SYSTEM_DIR def=NOFTRUNCATE 
OBJS            = $(HUFOBJS) $(LIBRARYOBJS) $(LHOBJS)

CC              = sc
CFLAGS          = $(SWITCHIES)

DISTDIR         = /usr/local/bin

all: LHA

LHA: $(OBJS)
  slink <WITH <
FROM $(STARTUP) $(OBJS)
LIBRARY $(LIBS) TO LHA
$(LFLAGS)
<
  



#       aout2exe lharc
#lharc.o lhadd.o lhext.o lhlist.o header.o append.o slide.o extract.o : lharc.h
#$(HUFOBJS) : slidehuf.h
#crcio.o extract.o slide.o : intrface.h

