1 # -*- Makefile -*- for gettext-runtime/src on VMS using the MMS utility
3 #### Start of system configuration section. ####
5 # Directories used by "make install":
7 exec_prefix = $(prefix)
8 bindir = $(exec_prefix).bin
9 datadir = $(prefix).share
10 localedir = $(datadir).locale
12 # Programs used by "make":
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.
18 ABIFLAGS = /name=(as_is,short) /float=ieee
20 WARN_CFLAGS = /warning
22 OPTIMFLAGS = /optimize
24 CFLAGS = $(ABIFLAGS) $(WARN_CFLAGS) $(OPTIMFLAGS)
25 DEFS = "VMS=1","HAVE_CONFIG_H=1","LOCALEDIR=""$(localedir)]"""
27 INCLUDES = /include=([],[-],[-.intl],[-.lib],[-.-.gettext-tools.lib])
29 LDADD = libiconv.opt/opt,[-.-.vms]link_options.opt
34 # Programs used by "make install":
36 INSTALL_PROGRAM = copy
39 #### End of system configuration section. ####
41 PROGRAMS = gettext.exe, ngettext.exe, envsubst.exe
43 gettext_OBJECTS = gettext.obj
44 ngettext_OBJECTS = ngettext.obj
45 envsubst_OBJECTS = envsubst.obj
48 write sys$output "Nothing else to be done for 'all'."
50 gettext.obj : gettext.c
51 $(CC) $(INCLUDES) $(CFLAGS) /define=($(DEFS),"INSTALLPREFIX=""$(prefix)]""","INSTALLDIR=""$(bindir)]""") gettext.c
53 ngettext.obj : ngettext.c
54 $(CC) $(INCLUDES) $(CFLAGS) /define=($(DEFS),"INSTALLPREFIX=""$(prefix)]""","INSTALLDIR=""$(bindir)]""") ngettext.c
56 envsubst.obj : envsubst.c
57 $(CC) $(INCLUDES) $(CFLAGS) /define=($(DEFS),"INSTALLPREFIX=""$(prefix)]""","INSTALLDIR=""$(bindir)]""") envsubst.c
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
63 gettext.exe : $(gettext_OBJECTS),libiconv.opt
64 link /executable=gettext.exe $(gettext_OBJECTS),[-.lib]grt.olb/lib,[-.intl]intl.olb/lib,$(LDADD)
66 ngettext.exe : $(ngettext_OBJECTS),libiconv.opt
67 link /executable=ngettext.exe $(ngettext_OBJECTS),[-.lib]grt.olb/lib,[-.intl]intl.olb/lib,$(LDADD)
69 envsubst.exe : $(envsubst_OBJECTS),libiconv.opt
70 link /executable=envsubst.exe $(envsubst_OBJECTS),[-.lib]grt.olb/lib,[-.intl]intl.olb/lib,$(LDADD)
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
81 create /directory $(prefix)]
82 create /directory $(exec_prefix)]
83 create /directory $(bindir)]
86 $(RM) $(bindir)]gettext.exe;
87 $(RM) $(bindir)]ngettext.exe;
88 $(RM) $(bindir)]envsubst.exe;
91 write sys$output "Nothing else to be done for 'check'."
94 write sys$output "Nothing else to be done for 'mostlyclean'."
101 write sys$output "Nothing else to be done for 'distclean'."
103 maintainer-clean : distclean
104 write sys$output "Nothing else to be done for 'maintainer-clean'."