# -*- Makefile -*- for libcharset 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
includedir = $(prefix).include

# Programs used by "make":
LN = copy
RM = delete

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

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

all : config.h
	if f$search("[.include]libcharset.h_in") .nes. "" then $(LN) [.include]libcharset.h_in [.include]libcharset.h
	if f$search("[.include]libcharset.h_in") .eqs. "" then $(LN) [.include]libcharset.h.in [.include]libcharset.h
	if f$search("[.include]localcharset.h_in") .nes. "" then $(LN) [.include]localcharset.h_in [.include]localcharset.h
	if f$search("[.include]localcharset.h_in") .eqs. "" then $(LN) [.include]localcharset.h.in [.include]localcharset.h
	set default [.lib]
	$(MMS) $(MMSQUALIFIERS) /description=Makefile.vms all
	set default [-]

config.h : config.h_vms
	$(LN) config.h_vms config.h

install :
	set default [.lib]
	$(MMS) $(MMSQUALIFIERS) /description=Makefile.vms install
	set default [-]
	create /directory $(prefix)]
	create /directory $(includedir)]
	$(INSTALL_DATA) [.include]libcharset.h $(includedir)]libcharset.h
	$(INSTALL_DATA) [.include]localcharset.h $(includedir)]localcharset.h

installdirs :
	set default [.lib]
	$(MMS) $(MMSQUALIFIERS) /description=Makefile.vms installdirs
	set default [-]
	create /directory $(prefix)]
	create /directory $(includedir)]

uninstall :
	set default [.lib]
	$(MMS) $(MMSQUALIFIERS) /description=Makefile.vms uninstall
	set default [-]
	$(RM) $(includedir)]libcharset.h
	$(RM) $(includedir)]localcharset.h

check : all
	set default [.lib]
	$(MMS) $(MMSQUALIFIERS) /description=Makefile.vms check
	set default [-]

mostlyclean :
	$(RM) config.h
	$(RM) [.include]libcharset.h
	$(RM) [.include]localcharset.h
	set default [.lib]
	$(MMS) $(MMSQUALIFIERS) /description=Makefile.vms mostlyclean
	set default [-]

clean :
	$(RM) config.h
	$(RM) [.include]libcharset.h
	$(RM) [.include]localcharset.h
	set default [.lib]
	$(MMS) $(MMSQUALIFIERS) /description=Makefile.vms clean
	set default [-]

distclean :
	$(RM) config.h
	$(RM) [.include]libcharset.h
	$(RM) [.include]localcharset.h
	set default [.lib]
	$(MMS) $(MMSQUALIFIERS) /description=Makefile.vms distclean
	set default [-]

maintainer-clean :
	$(RM) config.h
	$(RM) [.include]libcharset.h
	$(RM) [.include]localcharset.h
	set default [.lib]
	$(MMS) $(MMSQUALIFIERS) /description=Makefile.vms maintainer-clean
	set default [-]

