1# -*- Makefile -*- for gettext-runtime/src on VMS using the MMS utility 2 3#### Start of system configuration section. #### 4 5# Directories used by "make install": 6prefix = SYS$DATA:[ 7exec_prefix = $(prefix) 8bindir = $(exec_prefix).bin 9datadir = $(prefix).share 10localedir = $(datadir).locale 11 12# Programs used by "make": 13 14CC = cc 15 16# These flags affect binary compatibility. GNU gettext does not need them, 17# but other packages do, and we need to be binary compatible with them. 18ABIFLAGS = /name=(as_is,short) /float=ieee 19 20WARN_CFLAGS = /warning 21 22OPTIMFLAGS = /optimize 23 24CFLAGS = $(ABIFLAGS) $(WARN_CFLAGS) $(OPTIMFLAGS) 25DEFS = "VMS=1","HAVE_CONFIG_H=1","LOCALEDIR=""$(localedir)]""" 26 27INCLUDES = /include=([],[-],[-.intl],[-.lib],[-.-.gettext-tools.lib]) 28 29LDADD = libiconv.opt/opt,[-.-.vms]link_options.opt 30 31LN = copy 32RM = delete 33 34# Programs used by "make install": 35INSTALL = copy 36INSTALL_PROGRAM = copy 37INSTALL_DATA = copy 38 39#### End of system configuration section. #### 40 41PROGRAMS = gettext.exe, ngettext.exe, envsubst.exe 42 43gettext_OBJECTS = gettext.obj 44ngettext_OBJECTS = ngettext.obj 45envsubst_OBJECTS = envsubst.obj 46 47all : $(PROGRAMS) 48 write sys$output "Nothing else to be done for 'all'." 49 50gettext.obj : gettext.c 51 $(CC) $(INCLUDES) $(CFLAGS) /define=($(DEFS),"INSTALLPREFIX=""$(prefix)]""","INSTALLDIR=""$(bindir)]""") gettext.c 52 53ngettext.obj : ngettext.c 54 $(CC) $(INCLUDES) $(CFLAGS) /define=($(DEFS),"INSTALLPREFIX=""$(prefix)]""","INSTALLDIR=""$(bindir)]""") ngettext.c 55 56envsubst.obj : envsubst.c 57 $(CC) $(INCLUDES) $(CFLAGS) /define=($(DEFS),"INSTALLPREFIX=""$(prefix)]""","INSTALLDIR=""$(bindir)]""") envsubst.c 58 59libiconv.opt : 60 if f$search("sys$library:libiconv.olb") .nes. "" then $(LN) [-.-.vms]with-libiconv.opt libiconv.opt 61 if f$search("sys$library:libiconv.olb") .eqs. "" then $(LN) [-.-.vms]without-libiconv.opt libiconv.opt 62 63gettext.exe : $(gettext_OBJECTS),libiconv.opt 64 link /executable=gettext.exe $(gettext_OBJECTS),[-.lib]grt.olb/lib,[-.intl]intl.olb/lib,$(LDADD) 65 66ngettext.exe : $(ngettext_OBJECTS),libiconv.opt 67 link /executable=ngettext.exe $(ngettext_OBJECTS),[-.lib]grt.olb/lib,[-.intl]intl.olb/lib,$(LDADD) 68 69envsubst.exe : $(envsubst_OBJECTS),libiconv.opt 70 link /executable=envsubst.exe $(envsubst_OBJECTS),[-.lib]grt.olb/lib,[-.intl]intl.olb/lib,$(LDADD) 71 72install : all 73 create /directory $(prefix)] 74 create /directory $(exec_prefix)] 75 create /directory $(bindir)] 76 $(INSTALL_PROGRAM) gettext.exe $(bindir)]gettext.exe 77 $(INSTALL_PROGRAM) ngettext.exe $(bindir)]ngettext.exe 78 $(INSTALL_PROGRAM) envsubst.exe $(bindir)]envsubst.exe 79 80installdirs : 81 create /directory $(prefix)] 82 create /directory $(exec_prefix)] 83 create /directory $(bindir)] 84 85uninstall : 86 $(RM) $(bindir)]gettext.exe; 87 $(RM) $(bindir)]ngettext.exe; 88 $(RM) $(bindir)]envsubst.exe; 89 90check : all 91 write sys$output "Nothing else to be done for 'check'." 92 93mostlyclean : clean 94 write sys$output "Nothing else to be done for 'mostlyclean'." 95 96clean : 97 $(RM) *.obj;* 98 $(RM) *.exe;* 99 100distclean : clean 101 write sys$output "Nothing else to be done for 'distclean'." 102 103maintainer-clean : distclean 104 write sys$output "Nothing else to be done for 'maintainer-clean'." 105