# Makefile for gzip and C68 v4.20b
#
# NB: -DDIRFIX is there because libc_a v4.20b got a bug into "readdir" and
#     "opendir" routines. If you got a newer libc_a version, this bug should
#     not be there anymore and you may remove this define.

# Directories:

T = ram1_
P = win5_C68_

# Program names:

CC  = $(P)cc
CPP = $(P)cpp
C68 = $(P)c68
AS  = $(P)as68
LD  = $(P)ld

# Program flags:

CCFLAGS  = -v -O -tmp$(T) -Y$(P) -I$(P)include_ -DDIRFIX
ASFLAGS  = -V
LDFLAGS  = -v -L$(P)lib_ -bufp800K\

# Target name:

EXEC = gzip

# Additional libraries:

LIBS =

# Target dependencies:

OBJECTS = bits_o crypt_o deflate_o getopt_o gzip_o inflate_o lzw_o\
          tailor_o trees_o unlzw_o unpack_o unlzh_o unzip_o util_o zip_o\
          match_o

$(EXEC) : $(OBJECTS)

    $(LD) -o$(EXEC) $(LDFLAGS) $(OBJECTS) $(LIBS)


bits_o      : gzip.h tailor.h crypt.h
crypt_o     : gzip.h tailor.h
deflate_o   : gzip.h tailor.h
getopt_o    : tailor.h getopt.h
gzip_o      : gzip.h tailor.h revision.h lzw.h getopt.h
inflate_o   : gzip.h tailor.h
lzw_o       : gzip.h tailor.h
tailor_o    : revision.h
trees_o     : gzip.h tailor.h
unpack_o    : gzip.h tailor.h
unlzw_o     : gzip.h tailor.h revision.h lzw.h
unzip_o     : gzip.h tailor.h crypt.h
util_o      : gzip.h tailor.h crypt.h
zip_o       : gzip.h tailor.h crypt.h

# Construction rules:

_c_o :
    $(CC) -c $(CCFLAGS) $<

_asm_o :
    $(CPP) -v -P $< $(T)$*_s
    $(AS) $(ASFLAGS) $(T)$*_s $@

#end
