# Makefile for libcharset/lib

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

# Directories used by "make":
srcdir = ../.././../libcharset/lib

# Directories used by "make install":
prefix = /dev/env/DJDIR
local_prefix = /usr/local
exec_prefix = ${prefix}
libdir = ${exec_prefix}/lib

# Programs used by "make":
CC = gcc
CFLAGS = -g2 -O2 -std=gnu99 -march=i386 -mtune=i586 
CPPFLAGS = 
LDFLAGS = 
INCLUDES = -I. -I$(srcdir) -I.. -I$(srcdir)/.. -I../include
# -DBUILDING_LIBCHARSET: Change expansion of LIBCHARSET_DLL_EXPORTED macro.
DEFS = -DBUILDING_LIBCHARSET -DHAVE_CONFIG_H
LIBTOOL = $(SHELL) $(top_builddir)/libtool
LIBTOOL_COMPILE = $(LIBTOOL) --mode=compile
LIBTOOL_LINK = $(LIBTOOL) --mode=link
LIBTOOL_INSTALL = $(LIBTOOL) --mode=install
LIBTOOL_UNINSTALL = $(LIBTOOL) --mode=uninstall
RM = rm -f

# Programs used by "make install":
INSTALL = /dev/env/DJDIR/bin/ginstall -c
INSTALL_DATA = ${INSTALL} -m 644
mkinstalldirs = $(SHELL) ../.././../libcharset/build-aux/mkinstalldirs

# Set by DJGPP if DXE3 shared library shall be created.
MAKE_DXE3 =

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

PACKAGE = @PACKAGE@
VERSION = @VERSION@

SHELL = /bin/sh

# Before making a release, change this according to the libtool documentation,
# section "Library interface versions".
LIBCHARSET_VERSION_INFO = 1:0:0

# Needed by $(LIBTOOL).
top_builddir = ..

SOURCES = $(srcdir)/localcharset.c $(srcdir)/relocatable-stub.c

OBJECTS = localcharset.lo relocatable-stub.lo

all : libcharset.la

libcharset.la : $(OBJECTS)
	$(LIBTOOL_LINK) $(CC) $(LDFLAGS) $(CFLAGS) -o libcharset.la -rpath $(libdir) -version-info $(LIBCHARSET_VERSION_INFO) -no-undefined $(OBJECTS)
ifeq ($(MAKE_DXE3), y)
	cd _libs && dxe3gen -o libcharset.dxe -Y libcharset.tmp --whole-archive -U libcharset.a && mv -f libcharset.tmp libcharset.a
endif

localcharset.lo : $(srcdir)/localcharset.c
	$(LIBTOOL_COMPILE) $(CC) $(INCLUDES) $(CFLAGS) $(CPPFLAGS) $(DEFS) -c $(srcdir)/localcharset.c

relocatable-stub.lo : $(srcdir)/relocatable-stub.c
	$(LIBTOOL_COMPILE) $(CC) $(INCLUDES) $(CFLAGS) $(CPPFLAGS) $(DEFS) -c $(srcdir)/relocatable-stub.c

# Installs the library and include files only. Typically called with only
# $(libdir) and $(includedir) - don't use $(prefix) and $(exec_prefix) here.
install-lib : all force
	$(mkinstalldirs) $(libdir)
	$(LIBTOOL_INSTALL) $(INSTALL) libcharset.la $(libdir)/libcharset.la
ifeq ($(MAKE_DXE3), y)
	cd _libs && cp -vf *.dxe $(DESTDIR)$(libdir)
endif

# The following is needed in order to install a simple file in $(libdir)
# which is shared with other installed packages. We use a list of referencing
# packages so that "make uninstall" will remove the file if and only if it
# is not used by another installed package.
# On systems with glibc-2.1 or newer, the file is redundant, therefore we
# avoid installing it.

install : all force
	$(mkinstalldirs) $(DESTDIR)$(libdir) ; \
	$(LIBTOOL_INSTALL) $(INSTALL) libcharset.la $(DESTDIR)$(libdir)/libcharset.la
ifeq ($(MAKE_DXE3), y)
	cd _libs && cp -vf *.dxe $(DESTDIR)$(libdir)
endif

install-strip : install

installdirs : force
	$(mkinstalldirs) $(DESTDIR)$(libdir)

uninstall : force
	$(LIBTOOL_UNINSTALL) $(RM) $(DESTDIR)$(libdir)/libcharset.la
ifeq ($(MAKE_DXE3), y)
	$(RM) $(DESTDIR)$(libdir)/libcharset.la
endif

check : all

mostlyclean : clean

clean : force
	$(RM) *.o *.lo *.a *.la *.o.lock core *.stackdump
	$(RM) -r _libs _libs

distclean : clean
	$(RM) Makefile

maintainer-clean : distclean

# List of source files.
SOURCE_FILES = \
  ChangeLog Makefile.in \
  relocatable-stub.c
# List of files bidirectionally synced with gnulib.
GNULIB_SYNCED_FILES = \
  localcharset.c
# List of distributed files imported from other packages.
IMPORTED_FILES =
# List of distributed files generated by autotools or Makefile.devel.
GENERATED_FILES =
# List of distributed files generated by "make".
DISTRIBUTED_BUILT_FILES =
# List of distributed files.
DISTFILES = $(SOURCE_FILES) $(GNULIB_SYNCED_FILES) $(IMPORTED_FILES) $(GENERATED_FILES) $(DISTRIBUTED_BUILT_FILES)

distdir : $(DISTFILES)
	for file in $(DISTFILES); do \
	  if test -f $$file; then dir='.'; else dir='$(srcdir)'; fi; \
	  cp -p "$$dir/$$file" '$(distdir)'/$$file || exit 1; \
	done

force :

