| 1 |
# Makefile for the MVS (OS/390 Base) version of ZIP 2.3 |
| 2 |
# Produced for C/C++ V3R2 in OS/390 1.2.0 by Ian E. Gorman, 2 Nov 1998 |
| 3 |
# Facilities for compiling and testing were made available by |
| 4 |
# OmniMark Technologies Corporation, Ottawa, Canada |
| 5 |
|
| 6 |
# NOTES |
| 7 |
# |
| 8 |
# The only tabs in this file are in the first character of each recipe |
| 9 |
# line, where they are required by make. |
| 10 |
# |
| 11 |
# Run this makefile in OpenMVS (OS/390 POSIX) using source files in the |
| 12 |
# HFS file system. You can write the load module to either HFS file |
| 13 |
# system or to a PDS in the native MVS file system. The PDS must have |
| 14 |
# sufficient free space to hold the load module. |
| 15 |
# |
| 16 |
# To compile to a member of a PDS: |
| 17 |
# make |
| 18 |
# or |
| 19 |
# make zip.mvs |
| 20 |
# |
| 21 |
# To compile a test version into the HFS file system: |
| 22 |
# make hfs |
| 23 |
|
| 24 |
# ZIP options -- MVS, REENTRANT |
| 25 |
ZIPOPTS=-DMVS -DREENTRANT |
| 26 |
|
| 27 |
# directories |
| 28 |
|
| 29 |
# generic source code |
| 30 |
SRC=.. |
| 31 |
SRC_P=$(SRC)/ |
| 32 |
|
| 33 |
# source code for MVS |
| 34 |
CMSMVS=../cmsmvs |
| 35 |
CMSMVS_P=$(CMSMVS)/ |
| 36 |
|
| 37 |
# include files |
| 38 |
INCLS=-I$(SRC) -I$(CMSMVS) |
| 39 |
|
| 40 |
# object files and load modules |
| 41 |
BLD_P=../mvs/ |
| 42 |
|
| 43 |
# Other options |
| 44 |
|
| 45 |
# Suffixes (E and O must be different) |
| 46 |
E= |
| 47 |
O=.o |
| 48 |
|
| 49 |
# Need EXTENDED features for global.c and vmvms.c, so not using c89 |
| 50 |
CC=cc |
| 51 |
CFLAGS=-D_OPEN_SYS $(ZIPOPTS) $(INCLS) |
| 52 |
|
| 53 |
LD=cc |
| 54 |
LDFLAGS= |
| 55 |
|
| 56 |
# Files |
| 57 |
|
| 58 |
# object (TEXT) files |
| 59 |
OBJECTS= $(BLD_P)zip$(O) $(BLD_P)trees$(O) \ |
| 60 |
$(BLD_P)crypt$(O) $(BLD_P)ttyio$(O) $(BLD_P)deflate$(O) \ |
| 61 |
$(BLD_P)fileio$(O) $(BLD_P)globals$(O) $(BLD_P)util$(O) \ |
| 62 |
$(BLD_P)crc32$(O) $(BLD_P)zipfile$(O) \ |
| 63 |
$(BLD_P)zipup$(O) $(BLD_P)cmsmvs$(O) $(BLD_P)mvs$(O) |
| 64 |
|
| 65 |
# Header files |
| 66 |
HFILES= $(SRC_P)api.h $(SRC_P)crc32.h $(SRC_P)crypt.h $(SRC_P)ebcdic.h \ |
| 67 |
$(SRC_P)revision.h $(SRC_P)tailor.h $(SRC_P)ttyio.h \ |
| 68 |
$(SRC_P)zip.h $(SRC_P)ziperr.h $(CMSMVS_P)cmsmvs.h \ |
| 69 |
$(CMSMVS_P)cstat.h $(CMSMVS_P)mvs.h $(CMSMVS_P)zipup.h |
| 70 |
|
| 71 |
# Rules |
| 72 |
|
| 73 |
all: $(BLD_P)zip.mvs$(E) |
| 74 |
hfs: $(BLD_P)zip$(E) |
| 75 |
|
| 76 |
# link |
| 77 |
|
| 78 |
$(BLD_P)zip.mvs$(E): $(OBJECTS) |
| 79 |
$(LD) -o "//INFOZIP.LOAD(ZIP)" $(LDFLAGS) $^ |
| 80 |
echo "tso call \"infozip(zip)\" \"'\"\"""$$""@""\"\"'\"" > $% |
| 81 |
chmod a+x $% |
| 82 |
|
| 83 |
$(BLD_P)zip$(E): $(OBJECTS) |
| 84 |
$(LD) -o $% $(LDFLAGS) $^ |
| 85 |
|
| 86 |
# compile |
| 87 |
|
| 88 |
$(BLD_P)trees$(O): $(SRC_P)trees.c $(HFILES) |
| 89 |
$(CC) -c -o $% $(CFLAGS) $(SRC_P)trees.c |
| 90 |
|
| 91 |
$(BLD_P)crypt$(O): $(SRC_P)crypt.c $(HFILES) |
| 92 |
$(CC) -c -o $% $(CFLAGS) $(SRC_P)crypt.c |
| 93 |
|
| 94 |
$(BLD_P)ttyio$(O): $(SRC_P)ttyio.c $(HFILES) |
| 95 |
$(CC) -c -o $% $(CFLAGS) $(SRC_P)ttyio.c |
| 96 |
|
| 97 |
$(BLD_P)deflate$(O): $(SRC_P)deflate.c $(HFILES) |
| 98 |
$(CC) -c -o $% $(CFLAGS) $(SRC_P)deflate.c |
| 99 |
|
| 100 |
$(BLD_P)fileio$(O): $(SRC_P)fileio.c $(HFILES) |
| 101 |
$(CC) -c -o $% $(CFLAGS) $(SRC_P)fileio.c |
| 102 |
|
| 103 |
$(BLD_P)globals$(O): $(SRC_P)globals.c $(HFILES) |
| 104 |
$(CC) -c -o $% $(CFLAGS) $(SRC_P)globals.c |
| 105 |
|
| 106 |
$(BLD_P)zip$(O): $(SRC_P)zip.c $(HFILES) |
| 107 |
$(CC) -c -o $% $(CFLAGS) $(SRC_P)zip.c |
| 108 |
|
| 109 |
$(BLD_P)util$(O): $(SRC_P)util.c $(HFILES) |
| 110 |
$(CC) -c -o $% $(CFLAGS) $(SRC_P)util.c |
| 111 |
|
| 112 |
$(BLD_P)crc32$(O): $(SRC_P)crc32.c $(HFILES) |
| 113 |
$(CC) -c -o $% $(CFLAGS) $(SRC_P)crc32.c |
| 114 |
|
| 115 |
$(BLD_P)zipfile$(O): $(SRC_P)zipfile.c $(HFILES) |
| 116 |
$(CC) -c -o $% $(CFLAGS) $(SRC_P)zipfile.c |
| 117 |
|
| 118 |
$(BLD_P)zipup$(O): $(SRC_P)zipup.c $(HFILES) |
| 119 |
$(CC) -c -o $% $(CFLAGS) $(SRC_P)zipup.c |
| 120 |
|
| 121 |
$(BLD_P)cmsmvs$(O): $(CMSMVS_P)cmsmvs.c $(HFILES) |
| 122 |
$(CC) -c -o $% $(CFLAGS) $(CMSMVS_P)cmsmvs.c |
| 123 |
|
| 124 |
$(BLD_P)mvs$(O): $(CMSMVS_P)mvs.c $(HFILES) |
| 125 |
$(CC) -c -o $% $(CFLAGS) $(CMSMVS_P)mvs.c |