Makefile.msvc   [plain text]


# -*- Makefile -*- for libiconv

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

# Flags that can be set on the nmake command line:
#   DLL=1     for compiling a .dll with a stub .lib (default is a static .lib)
#             Note that this works only with MFLAGS=-MD.
#   MFLAGS={-ML|-MT|-MD} for defining the compilation model
#     MFLAGS=-ML (the default)  Single-threaded, statically linked - libc.lib
#     MFLAGS=-MT                Multi-threaded, statically linked  - libcmt.lib
#     MFLAGS=-MD                Multi-threaded, dynamically linked - msvcrt.lib
#   DEBUG=1   for compiling with debugging information
#   NO_NLS=1  do not use Native Language Support
#   PREFIX=Some\Directory       Base directory for installation
#   IIPREFIX=Some\\Directory    Same thing with doubled backslashes
# Note that nmake command line flags are automatically passed to subdirectory
# Makefiles. Therefore we don't need to pass them explicitly to subdirectory
# Makefiles, but the subdirectory Makefiles need to have the same defaults.
!if !defined(DLL)
DLL=0
!endif
!if !defined(DEBUG)
DEBUG=0
!endif
!if !defined(MFLAGS)
!if !$(DLL)
MFLAGS=
!else
MFLAGS=-MD
!endif
!endif
!if !defined(NO_NLS)
NO_NLS=0
!endif
!if !defined(PREFIX)
PREFIX = c:\usr
!endif
!if !defined(IIPREFIX)
IIPREFIX = c:\\usr
!endif

# Directories used by "make install":
prefix = $(PREFIX)
exec_prefix = $(prefix)
bindir = $(exec_prefix)\bin
libdir = $(exec_prefix)\lib
includedir = $(prefix)\include
datadir = $(prefix)\share
localedir = $(datadir)\locale
mandir = $(datadir)\man
docdir = $(datadir)\doc\libiconv

# Programs used by "make":
LN = copy
RM = -del

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

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

SHELL = /bin/sh

all : config.h force
	cd libcharset
	$(MAKE) -f Makefile.msvc all
	cd ..
	$(LN) libcharset\include\localcharset.h lib\localcharset.h
!if !$(DLL)
	$(LN) include\iconv.h.msvc-static include\iconv.h
!else
	$(LN) include\iconv.h.msvc-shared include\iconv.h
!endif
	cd lib
	$(MAKE) -f Makefile.msvc all
	cd ..
	cd srclib
	$(MAKE) -f Makefile.msvc all
	cd ..
	cd src
	$(MAKE) -f Makefile.msvc all
	cd ..
	cd po
	$(MAKE) -f Makefile.msvc all
	cd ..
	cd man
	$(MAKE) -f Makefile.msvc all
	cd ..
	cd tests
	$(MAKE) -f Makefile.msvc all
	cd ..

config.h : config.h.msvc
	-$(RM) config.h
	$(LN) config.h.msvc config.h

install : force
	cd libcharset
	$(MAKE) -f Makefile.msvc install
	cd ..
	cd lib
	$(MAKE) -f Makefile.msvc install
	cd ..
	cd srclib
	$(MAKE) -f Makefile.msvc install
	cd ..
	cd src
	$(MAKE) -f Makefile.msvc install
	cd ..
	cd po
	$(MAKE) -f Makefile.msvc install
	cd ..
	cd man
	$(MAKE) -f Makefile.msvc install
	cd ..
	cd tests
	$(MAKE) -f Makefile.msvc install
	cd ..
	-mkdir $(prefix)
	-mkdir $(includedir)
	$(INSTALL_DATA) include\iconv.h $(includedir)\iconv.h

installdirs : force
	cd libcharset
	$(MAKE) -f Makefile.msvc installdirs
	cd ..
	cd lib
	$(MAKE) -f Makefile.msvc installdirs
	cd ..
	cd srclib
	$(MAKE) -f Makefile.msvc installdirs
	cd ..
	cd src
	$(MAKE) -f Makefile.msvc installdirs
	cd ..
	cd po
	$(MAKE) -f Makefile.msvc installdirs
	cd ..
	cd man
	$(MAKE) -f Makefile.msvc installdirs
	cd ..
	cd tests
	$(MAKE) -f Makefile.msvc installdirs
	cd ..
	-mkdir $(prefix)
	-mkdir $(includedir)

uninstall : force
	cd libcharset
	$(MAKE) -f Makefile.msvc uninstall
	cd ..
	cd lib
	$(MAKE) -f Makefile.msvc uninstall
	cd ..
	cd srclib
	$(MAKE) -f Makefile.msvc uninstall
	cd ..
	cd src
	$(MAKE) -f Makefile.msvc uninstall
	cd ..
	cd po
	$(MAKE) -f Makefile.msvc uninstall
	cd ..
	cd man
	$(MAKE) -f Makefile.msvc uninstall
	cd ..
	cd tests
	$(MAKE) -f Makefile.msvc uninstall
	cd ..
	$(RM) $(includedir)\iconv.h

check : all force
	cd libcharset
	$(MAKE) -f Makefile.msvc check
	cd ..
	cd lib
	$(MAKE) -f Makefile.msvc check
	cd ..
	cd srclib
	$(MAKE) -f Makefile.msvc check
	cd ..
	cd src
	$(MAKE) -f Makefile.msvc check
	cd ..
	cd po
	$(MAKE) -f Makefile.msvc check
	cd ..
	cd man
	$(MAKE) -f Makefile.msvc check
	cd ..
	cd tests
	$(MAKE) -f Makefile.msvc check
	cd ..

mostlyclean : force
	$(RM) config.h
	cd libcharset
	$(MAKE) -f Makefile.msvc mostlyclean
	cd ..
	$(RM) lib\localcharset.h
	$(RM) include\iconv.h
	cd lib
	$(MAKE) -f Makefile.msvc mostlyclean
	cd ..
	cd srclib
	$(MAKE) -f Makefile.msvc mostlyclean
	cd ..
	cd src
	$(MAKE) -f Makefile.msvc mostlyclean
	cd ..
	cd po
	$(MAKE) -f Makefile.msvc mostlyclean
	cd ..
	cd man
	$(MAKE) -f Makefile.msvc mostlyclean
	cd ..
	cd tests
	$(MAKE) -f Makefile.msvc mostlyclean
	cd ..

clean : force
	$(RM) config.h
	cd libcharset
	$(MAKE) -f Makefile.msvc clean
	cd ..
	$(RM) lib\localcharset.h
	$(RM) include\iconv.h
	cd lib
	$(MAKE) -f Makefile.msvc clean
	cd ..
	cd srclib
	$(MAKE) -f Makefile.msvc clean
	cd ..
	cd src
	$(MAKE) -f Makefile.msvc clean
	cd ..
	cd po
	$(MAKE) -f Makefile.msvc clean
	cd ..
	cd man
	$(MAKE) -f Makefile.msvc clean
	cd ..
	cd tests
	$(MAKE) -f Makefile.msvc clean
	cd ..

distclean : force
	$(RM) config.h
	cd libcharset
	$(MAKE) -f Makefile.msvc distclean
	cd ..
	$(RM) lib\localcharset.h
	$(RM) include\iconv.h
	cd lib
	$(MAKE) -f Makefile.msvc distclean
	cd ..
	cd srclib
	$(MAKE) -f Makefile.msvc distclean
	cd ..
	cd src
	$(MAKE) -f Makefile.msvc distclean
	cd ..
	cd po
	$(MAKE) -f Makefile.msvc distclean
	cd ..
	cd man
	$(MAKE) -f Makefile.msvc distclean
	cd ..
	cd tests
	$(MAKE) -f Makefile.msvc distclean
	cd ..

maintainer-clean : force
	$(RM) config.h
	cd libcharset
	$(MAKE) -f Makefile.msvc maintainer-clean
	cd ..
	$(RM) lib\localcharset.h
	$(RM) include\iconv.h
	cd lib
	$(MAKE) -f Makefile.msvc maintainer-clean
	cd ..
	cd srclib
	$(MAKE) -f Makefile.msvc maintainer-clean
	cd ..
	cd src
	$(MAKE) -f Makefile.msvc maintainer-clean
	cd ..
	cd po
	$(MAKE) -f Makefile.msvc maintainer-clean
	cd ..
	cd man
	$(MAKE) -f Makefile.msvc maintainer-clean
	cd ..
	cd tests
	$(MAKE) -f Makefile.msvc maintainer-clean
	cd ..

force :