summaryrefslogtreecommitdiff
path: root/Build/source/utils/gzip/vms/Makefile.gcc
blob: 04506759e7da8081c550dd85620f034f26031baf (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
126
127
128
129
130
131
# Makefile for gzip (GNU zip)    -*- Indented-Text -*-
# Copyright (C) 1992-1993 Jean-loup Gailly and the Free Software Foundation
# VMS version made by Klaus Reimann <kr@cip.physik.uni-stuttgart.de>,
# revised by Roland B Roberts <roberts@nsrl31.nsrl.rochester.edu>.
# This version is for gcc.

# After constructing gzip.exe with this Makefile, you should set up
# symbols for gzip.exe.  Edit the example below, changing
# "disk:[directory]" as appropriate.
#
# $ gzip   == "$disk:[directory]gzip.exe"
# $ gunzip == "$disk:[directory]gunzip.exe"
# $ zcat   == "$disk:[directory]zcat.exe"


# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.

# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

#### Start of system configuration section. ####

CC = gcc
LINK = link

CFLAGS =
# CFLAGS = /warning
LDFLAGS =

# Things you might add to DEFS
# -DDIRENT              Use <dirent.h>  for recursion (-r)
# -DSYSDIR              Use <sys/dir.h> for recursion (-r)
# -DSYSNDIR             Use <sys/ndir.h> for recursion (-r)
# -DNDIR                Use <ndir.h> for recursion (-r)
# -DSTDC_HEADERS        Use <stdlib.h>
# -DHAVE_UNISTD_H	Use <unistd.h>
# -DNO_UTIME_H		Don't use <utime.h>
# -DHAVE_SYSUTIME_H	Use <sys/utime.h>
# -DNO_MEMORY_H         Don't use <memory.h>. Not needed if STDC_HEADERS.
# -DNO_STRING_H         Use strings.h, not string.h. Not needed if STDC_HEADERS
# -DRETSIGTYPE=int      Define this if signal handlers must return an int.
# -DNO_SYMLINK          OS defines S_IFLNK but does not support symbolic links
# -DNO_MULTIPLE_DOTS    System does not allow file names with multiple dots
# -DNO_UTIME		System does not support setting file modification time
# -DNO_CHOWN		System does not support setting file owner
# -DNO_DIR		System does not support readdir()
# -DPROTO		Force function prototypes even if __STDC__ not defined
# -DASMV		Use asm version match.S
# -DMSDOS		MSDOS specific
# -DOS2			OS/2 specific
# -DVAXC		Vax/VMS with Vax C compiler
# -DVMS			Vax/VMS with gcc
# -DDEBUG		Debug code
# -DDYN_ALLOC		Use dynamic allocation of large data structures
# -DMAXSEG_64K		Maximum array size is 64K (for 16 bit system)
# -DRECORD_IO           read() and write() are rounded to record sizes.
# -DNO_STDIN_FSTAT      fstat() is not available on stdin
# -DNO_SIZE_CHECK       stat() does not give a reliable file size

DEFS = /define=(VMS)
LIBS = #@LIBS@

X=.exe
O=.obj

# additional assembly sources for particular systems be required.
OBJA = #@OBJA@

#### End of system configuration section. ####

OBJS = gzip$O zip$O deflate$O trees$O bits$O unzip$O inflate$O util$O \
       crypt$O lzw$O unlzw$O unpack$O unlzh$O getopt$O vms$O $(OBJA)

# --- rules ---

*$O:	*.c
	$(CC) $* $(DEFS) $(CFLAGS)
#	create sys$output
#		$(CC) $* $(DEFS) $(CFLAGS)$

default:  all

all:	gzip$X #zcmp zdiff zmore znew

gzip$X : $(OBJS) #Makefile
  linkobjs:=$(OBJS)
  Schleife:
	p = f$locate(" ",linkobjs)
	if p .lt. f$length(linkobjs)
		then	linkobjs[p,1]:=","
			goto Schleife
	endif
  write sys$output "linking ''linkobjs'"
  $(LINK) $(LDFLAGS) /exec=gzip$X  'linkobjs',sys$input/opt
	GNU_CC:[000000]GCCLIB/LIB,SYS$LIBRARY:VAXCRTL/SHARE $

#  Create a hard link.  To remove both files, use "make clean".  Using a hard
#  link saves disk space, by the way.  Note, however, that copying a hard link
#  copies the data, not just the link.  Therefore, set up the link in the
#  directory in which the executable is to reside, or else rename (move) the
#  executables into the directory.
# 
  set file/enter=gunzip.exe gzip.exe
  set file/enter=zcat.exe   gzip.exe


clean:
	set file/remove gunzip.exe;0
	set file/remove zcat.exe;0
	delete gzip.exe;0
	delete *$O;0

# Actual build-related targets

gzip$O zip$O deflate$O trees$O bits$O unzip$O inflate$O: gzip.h tailor.h
util$O lzw$O unlzw$O unpack$O unlzh$O crypt$O: gzip.h tailor.h

gzip$O unlzw$O: revision.h lzw.h

bits$O unzip$O util$O zip$O: crypt.h

gzip$O getopt$O: getopt.h