# -*- Makefile -*- for gettext-tools/lib on VMS using the MMS utility

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

# Directories used by "make install":
prefix = SYS$DATA:[
exec_prefix = $(prefix)
libdir = $(exec_prefix).lib
pkgdatadir = $(datadir).gettext

# Programs used by "make":

CC = cc

# These flags affect binary compatibility. GNU gettext does not need them,
# but other packages do, and we need to be binary compatible with them.
ABIFLAGS = /name=(as_is,short) /float=ieee

WARN_CFLAGS = /warning

OPTIMFLAGS = /optimize

CFLAGS = $(ABIFLAGS) $(WARN_CFLAGS) $(OPTIMFLAGS)
DEFS = "VMS=1","HAVE_CONFIG_H=1","PKGDATADIR=""$(pkgdatadir)]""","EXEEXT="".exe""","LIBDIR=""$(libdir)]"""

INCLUDES = /include=([],[-],[-.intl])

AR = library
AR_FLAGS = /create

LN = copy
RM = delete

# Programs used by "make install":
INSTALL = copy
INSTALL_PROGRAM = copy
INSTALL_DATA = copy

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

OBJECTS = \
  allocsa.obj, \
  argmatch.obj, \
  backupfile.obj, addext.obj, \
  basename.obj, \
  c-ctype.obj, \
  c-strcasecmp.obj, \
  c-strncasecmp.obj, \
  classpath.obj, \
  clean-temp.obj, \
  closeout.obj, \
  copy-file.obj, \
  csharpcomp.obj, \
  csharpexec.obj, \
  error-progname.obj, \
  execute.obj, \
  exitfail.obj, \
  fatal-signal.obj, \
  findprog.obj, \
  fstrcmp.obj, \
  full-write.obj, \
  fwriteerror.obj, \
  gcd.obj, \
  hash.obj, \
  iconvstring.obj, \
  javacomp.obj, \
  javaexec.obj, \
  javaversion.obj, \
  linebreak.obj, \
  mbswidth.obj, \
  obstack.obj, \
  concatpath.obj, \
  pipe.obj, \
  progname.obj, progreloc.obj, \
  propername.obj, \
  quote.obj, \
  quotearg.obj, \
  safe-read.obj, \
  safe-write.obj, \
  sh-quote.obj, \
  tmpdir.obj, \
  wait-process.obj, \
  xmalloc.obj, xstrdup.obj, \
  xallocsa.obj, \
  xerror.obj, \
  xsetenv.obj, \
  xvasprintf.obj, xasprintf.obj, \
  \
  error.obj, \
  fnmatch.obj, \
  getline.obj, \
  getndelim2.obj, \
  getopt.obj, getopt1.obj, \
  mkdtemp.obj, \
  relocatable.obj, \
  stpcpy.obj, \
  stpncpy.obj, \
  vasprintf.obj

all : alloca.h,fnmatch.h,gettextlib.olb
	write sys$output "Nothing else to be done for 'all'."

alloca.h : alloca_.h
	$(LN) alloca_.h alloca.h

fnmatch.h : fnmatch_.h
	$(LN) fnmatch_.h fnmatch.h

allocsa.obj : allocsa.c
	$(CC) $(INCLUDES) $(CFLAGS) /define=($(DEFS)) allocsa.c

argmatch.obj : argmatch.c
	$(CC) $(INCLUDES) $(CFLAGS) /define=($(DEFS)) argmatch.c

backupfile.obj : backupfile.c
	$(CC) $(INCLUDES) $(CFLAGS) /define=($(DEFS)) backupfile.c

addext.obj : addext.c
	$(CC) $(INCLUDES) $(CFLAGS) /define=($(DEFS)) addext.c

basename.obj : basename.c
	$(CC) $(INCLUDES) $(CFLAGS) /define=($(DEFS)) basename.c

c-ctype.obj : c-ctype.c
	$(CC) $(INCLUDES) $(CFLAGS) /define=($(DEFS)) c-ctype.c

c-strcasecmp.obj : c-strcasecmp.c
	$(CC) $(INCLUDES) $(CFLAGS) /define=($(DEFS)) c-strcasecmp.c

c-strncasecmp.obj : c-strncasecmp.c
	$(CC) $(INCLUDES) $(CFLAGS) /define=($(DEFS)) c-strncasecmp.c

classpath.obj : classpath.c
	$(CC) $(INCLUDES) $(CFLAGS) /define=($(DEFS)) classpath.c

clean-temp.obj : clean-temp.c
	$(CC) $(INCLUDES) $(CFLAGS) /define=($(DEFS)) clean-temp.c

closeout.obj : closeout.c
	$(CC) $(INCLUDES) $(CFLAGS) /define=($(DEFS)) closeout.c

copy-file.obj : copy-file.c
	$(CC) $(INCLUDES) $(CFLAGS) /define=($(DEFS)) copy-file.c

csharpcomp.obj : csharpcomp.c,alloca.h
	$(CC) $(INCLUDES) $(CFLAGS) /define=($(DEFS)) csharpcomp.c

csharpexec.obj : csharpexec.c,alloca.h
	$(CC) $(INCLUDES) $(CFLAGS) /define=($(DEFS)) csharpexec.c

error-progname.obj : error-progname.c
	$(CC) $(INCLUDES) $(CFLAGS) /define=($(DEFS)) error-progname.c

execute.obj : execute.c
	$(CC) $(INCLUDES) $(CFLAGS) /define=($(DEFS)) execute.c

exitfail.obj : exitfail.c
	$(CC) $(INCLUDES) $(CFLAGS) /define=($(DEFS)) exitfail.c

fatal-signal.obj : fatal-signal.c
	$(CC) $(INCLUDES) $(CFLAGS) /define=($(DEFS)) fatal-signal.c

findprog.obj : findprog.c
	$(CC) $(INCLUDES) $(CFLAGS) /define=($(DEFS)) findprog.c

fstrcmp.obj : fstrcmp.c
	$(CC) $(INCLUDES) $(CFLAGS) /define=($(DEFS)) fstrcmp.c

full-write.obj : full-write.c
	$(CC) $(INCLUDES) $(CFLAGS) /define=($(DEFS)) full-write.c

fwriteerror.obj : fwriteerror.c
	$(CC) $(INCLUDES) $(CFLAGS) /define=($(DEFS)) fwriteerror.c

gcd.obj : gcd.c
	$(CC) $(INCLUDES) $(CFLAGS) /define=($(DEFS)) gcd.c

hash.obj : hash.c
	$(CC) $(INCLUDES) $(CFLAGS) /define=($(DEFS)) hash.c

iconvstring.obj : iconvstring.c
	$(CC) $(INCLUDES) $(CFLAGS) /define=($(DEFS)) iconvstring.c

javacomp.obj : javacomp.c,alloca.h
	$(CC) $(INCLUDES) $(CFLAGS) /define=($(DEFS)) javacomp.c

javaexec.obj : javaexec.c,alloca.h
	$(CC) $(INCLUDES) $(CFLAGS) /define=($(DEFS)) javaexec.c

javaversion.obj : javaversion.c
	$(CC) $(INCLUDES) $(CFLAGS) /define=($(DEFS)) javaversion.c

linebreak.obj : linebreak.c
	$(CC) $(INCLUDES) $(CFLAGS) /define=($(DEFS)) linebreak.c

mbswidth.obj : mbswidth.c
	$(CC) $(INCLUDES) $(CFLAGS) /define=($(DEFS)) mbswidth.c

obstack.obj : obstack.c
	$(CC) $(INCLUDES) $(CFLAGS) /define=($(DEFS)) obstack.c

concatpath.obj : concatpath.c
	$(CC) $(INCLUDES) $(CFLAGS) /define=($(DEFS)) concatpath.c

pipe.obj : pipe.c
	$(CC) $(INCLUDES) $(CFLAGS) /define=($(DEFS)) pipe.c

progname.obj : progname.c
	$(CC) $(INCLUDES) $(CFLAGS) /define=($(DEFS)) progname.c

progreloc.obj : progreloc.c
	$(CC) $(INCLUDES) $(CFLAGS) /define=($(DEFS)) progreloc.c

propername.obj : propername.c
	$(CC) $(INCLUDES) $(CFLAGS) /define=($(DEFS)) propername.c

quote.obj : quote.c
	$(CC) $(INCLUDES) $(CFLAGS) /define=($(DEFS)) quote.c

quotearg.obj : quotearg.c
	$(CC) $(INCLUDES) $(CFLAGS) /define=($(DEFS)) quotearg.c

safe-read.obj : safe-read.c
	$(CC) $(INCLUDES) $(CFLAGS) /define=($(DEFS)) safe-read.c

safe-write.obj : safe-write.c
	$(CC) $(INCLUDES) $(CFLAGS) /define=($(DEFS)) safe-write.c

sh-quote.obj : sh-quote.c
	$(CC) $(INCLUDES) $(CFLAGS) /define=($(DEFS)) sh-quote.c

tmpdir.obj : tmpdir.c
	$(CC) $(INCLUDES) $(CFLAGS) /define=($(DEFS)) tmpdir.c

wait-process.obj : wait-process.c
	$(CC) $(INCLUDES) $(CFLAGS) /define=($(DEFS)) wait-process.c

xmalloc.obj : xmalloc.c
	$(CC) $(INCLUDES) $(CFLAGS) /define=($(DEFS)) xmalloc.c

xstrdup.obj : xstrdup.c
	$(CC) $(INCLUDES) $(CFLAGS) /define=($(DEFS)) xstrdup.c

xallocsa.obj : xallocsa.c
	$(CC) $(INCLUDES) $(CFLAGS) /define=($(DEFS)) xallocsa.c

xerror.obj : xerror.c
	$(CC) $(INCLUDES) $(CFLAGS) /define=($(DEFS)) xerror.c

xsetenv.obj : xsetenv.c
	$(CC) $(INCLUDES) $(CFLAGS) /define=($(DEFS)) xsetenv.c

xvasprintf.obj : xvasprintf.c
	$(CC) $(INCLUDES) $(CFLAGS) /define=($(DEFS)) xvasprintf.c

xasprintf.obj : xasprintf.c
	$(CC) $(INCLUDES) $(CFLAGS) /define=($(DEFS)) xasprintf.c

error.obj : error.c
	$(CC) $(INCLUDES) $(CFLAGS) /define=($(DEFS)) error.c

fnmatch.obj : fnmatch.c fnmatch.h fnmatch_loop.c
	$(CC) $(INCLUDES) $(CFLAGS) /define=($(DEFS)) fnmatch.c

getline.obj : getline.c
	$(CC) $(INCLUDES) $(CFLAGS) /define=($(DEFS)) getline.c

getndelim2.obj : getndelim2.c
	$(CC) $(INCLUDES) $(CFLAGS) /define=($(DEFS)) getndelim2.c

getopt.obj : getopt.c
	$(CC) $(INCLUDES) $(CFLAGS) /define=($(DEFS),"ELIDE_CODE=1") getopt.c

getopt1.obj : getopt1.c
	$(CC) $(INCLUDES) $(CFLAGS) /define=($(DEFS)) getopt1.c

mkdtemp.obj : mkdtemp.c
	$(CC) $(INCLUDES) $(CFLAGS) /define=($(DEFS)) mkdtemp.c

relocatable.obj : relocatable.c
	$(CC) $(INCLUDES) $(CFLAGS) /define=($(DEFS)) relocatable.c

stpcpy.obj : stpcpy.c
	$(CC) $(INCLUDES) $(CFLAGS) /define=($(DEFS)) stpcpy.c

stpncpy.obj : stpncpy.c
	$(CC) $(INCLUDES) $(CFLAGS) /define=($(DEFS)) stpncpy.c

vasprintf.obj : vasprintf.c
	$(CC) $(INCLUDES) $(CFLAGS) /define=($(DEFS)) vasprintf.c

gettextlib.olb : $(OBJECTS)
	$(AR) $(AR_FLAGS) gettextlib.olb $(OBJECTS)

install : all
	write sys$output "Nothing else to be done for 'install'."

installdirs :
	write sys$output "Nothing to be done for 'installdirs'."

uninstall :
	write sys$output "Nothing to be done for 'uninstall'."

check : all
	write sys$output "Nothing else to be done for 'check'."

mostlyclean : clean
	write sys$output "Nothing else to be done for 'mostlyclean'."

clean :
	$(RM) *.obj;*
	$(RM) *.olb;*

distclean : clean
	write sys$output "Nothing else to be done for 'distclean'."

maintainer-clean : distclean
	write sys$output "Nothing else to be done for 'maintainer-clean'."
