summaryrefslogtreecommitdiff
path: root/cmsmvs/mvs.mki
blob: 316d06452bf670651b6797c3f16e1c61581118a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
# Makefile for the MVS (OS/390 Base) version of ZIP 2.3
# Produced for C/C++ V3R2 in OS/390 1.2.0 by Ian E. Gorman, 2 Nov 1998
# Facilities for compiling and testing were made available by
#     OmniMark Technologies Corporation, Ottawa, Canada

# NOTES
#
# The only tabs in this file are in the first character of each recipe
# line, where they are required by make.
#
# Run this makefile in OpenMVS (OS/390 POSIX) using source files in the
# HFS file system.  You can write the load module to either HFS file
# system or to a PDS in the native MVS file system.  The PDS must have
# sufficient free space to hold the load module.
#
# To compile to a member of a PDS:
#   make
# or
#   make zip.mvs
#
# To compile a test version into the HFS file system:
#   make hfs

# ZIP options -- MVS, REENTRANT
ZIPOPTS=-DMVS -DREENTRANT

# directories

# generic source code
SRC=..
SRC_P=$(SRC)/

# source code for MVS
CMSMVS=../cmsmvs
CMSMVS_P=$(CMSMVS)/

# include files
INCLS=-I$(SRC) -I$(CMSMVS)

# object files and load modules
BLD_P=../mvs/

# Other options

# Suffixes (E and O must be different)
E=
O=.o

# Need EXTENDED features for global.c and vmvms.c, so not using c89
CC=cc
CFLAGS=-D_OPEN_SYS $(ZIPOPTS) $(INCLS)

LD=cc
LDFLAGS=

# Files

# object (TEXT) files
OBJECTS= $(BLD_P)zip$(O) $(BLD_P)trees$(O) \
   $(BLD_P)crypt$(O)  $(BLD_P)ttyio$(O)   $(BLD_P)deflate$(O) \
   $(BLD_P)fileio$(O) $(BLD_P)globals$(O) $(BLD_P)util$(O) \
   $(BLD_P)crc32$(O)  $(BLD_P)zipfile$(O) \
   $(BLD_P)zipup$(O)  $(BLD_P)cmsmvs$(O)  $(BLD_P)mvs$(O)

# Header files
HFILES= $(SRC_P)api.h $(SRC_P)crc32.h $(SRC_P)crypt.h $(SRC_P)ebcdic.h \
    $(SRC_P)revision.h $(SRC_P)tailor.h $(SRC_P)ttyio.h \
    $(SRC_P)zip.h $(SRC_P)ziperr.h $(CMSMVS_P)cmsmvs.h \
    $(CMSMVS_P)cstat.h $(CMSMVS_P)mvs.h $(CMSMVS_P)zipup.h

# Rules

all:  $(BLD_P)zip.mvs$(E)
hfs:  $(BLD_P)zip$(E)

# link

$(BLD_P)zip.mvs$(E):     $(OBJECTS)
	$(LD) -o "//INFOZIP.LOAD(ZIP)" $(LDFLAGS) $^
	echo "tso call \"infozip(zip)\" \"'\"\"""$$""@""\"\"'\"" > $%
	chmod a+x $%

$(BLD_P)zip$(E):     $(OBJECTS)
	$(LD) -o $% $(LDFLAGS) $^

# compile

$(BLD_P)trees$(O):   $(SRC_P)trees.c        $(HFILES)
	$(CC) -c -o $% $(CFLAGS) $(SRC_P)trees.c

$(BLD_P)crypt$(O):   $(SRC_P)crypt.c        $(HFILES)
	$(CC) -c -o $% $(CFLAGS) $(SRC_P)crypt.c

$(BLD_P)ttyio$(O):   $(SRC_P)ttyio.c        $(HFILES)
	$(CC) -c -o $% $(CFLAGS) $(SRC_P)ttyio.c

$(BLD_P)deflate$(O): $(SRC_P)deflate.c      $(HFILES)
	$(CC) -c -o $% $(CFLAGS) $(SRC_P)deflate.c

$(BLD_P)fileio$(O):  $(SRC_P)fileio.c       $(HFILES)
	$(CC) -c -o $% $(CFLAGS) $(SRC_P)fileio.c

$(BLD_P)globals$(O): $(SRC_P)globals.c      $(HFILES)
	$(CC) -c -o $% $(CFLAGS) $(SRC_P)globals.c

$(BLD_P)zip$(O):     $(SRC_P)zip.c          $(HFILES)
	$(CC) -c -o $% $(CFLAGS) $(SRC_P)zip.c

$(BLD_P)util$(O):    $(SRC_P)util.c         $(HFILES)
	$(CC) -c -o $% $(CFLAGS) $(SRC_P)util.c

$(BLD_P)crc32$(O):   $(SRC_P)crc32.c        $(HFILES)
	$(CC) -c -o $% $(CFLAGS) $(SRC_P)crc32.c

$(BLD_P)zipfile$(O): $(SRC_P)zipfile.c      $(HFILES)
	$(CC) -c -o $% $(CFLAGS) $(SRC_P)zipfile.c

$(BLD_P)zipup$(O):   $(SRC_P)zipup.c        $(HFILES)
	$(CC) -c -o $% $(CFLAGS) $(SRC_P)zipup.c

$(BLD_P)cmsmvs$(O):  $(CMSMVS_P)cmsmvs.c    $(HFILES)
	$(CC) -c -o $% $(CFLAGS) $(CMSMVS_P)cmsmvs.c

$(BLD_P)mvs$(O):     $(CMSMVS_P)mvs.c       $(HFILES)
	$(CC) -c -o $% $(CFLAGS) $(CMSMVS_P)mvs.c