1
# Makefile for libiconv/src, OS2/EMX specific
3
# requires EMX/GCC developpment environment and
4
# GNU fileutils and GNU textutils installed
6
# define EMXPATH=<your EMX path> on install/uninstall
9
#### Start of system configuration section. ####
11
# Directories used by "make install":
13
exec_prefix = $(prefix)
14
libdir = $(exec_prefix)/lib
15
shlibdir = $(exec_prefix)/dll
17
# Programs used by "make":
19
CFLAGS = -O2 -Zomf -Zcrtdll -Zmt
20
INCLUDES = -I. -I../include
22
#### End of system configuration section. ####
30
all : iconv.dll iconv.a iconv.lib
33
sed -e 's/#undef WORDS_LITTLEENDIAN$$/#define WORDS_LITTLEENDIAN 1/' < config.h.in > config.h
35
iconv.obj : iconv.c encodings.def aliases.h config.h
36
$(CC) $(CFLAGS) $(INCLUDES) -c iconv.c
38
iconv.dll : $(OBJECTS) ../os2/iconv.def # DLL itself
39
$(CC) -Zdll $(CFLAGS) -o $@ $(OBJECTS) iconv.def
41
iconv.lib : ../os2/iconv.def # Import Lib. for -Zomf
43
emximp -o iconv.lib ../os2/iconv.def
45
iconv.a : ../os2/iconv.def # Import Lib. for EMX .o format
47
emximp -o iconv.a ../os2/iconv.def
49
# Installs the library and include files only. Typically called with only
50
# $(libdir), $(shlibdir) and $(includedir) - don't use $(prefix) and
51
# $(exec_prefix) here.
52
install-lib : all force
53
cp -i iconv.dll $(shlibdir)/iconv.dll
54
cp -i iconv.lib $(libdir)/iconv.lib
55
cp -i iconv.a $(libdir)/iconv.a
58
cp -i iconv.dll $(shlibdir)/iconv.dll
59
cp -i iconv.lib $(libdir)/iconv.lib
60
cp -i iconv.a $(libdir)/iconv.a
63
rm -f $(shlibdir)/iconv.dll
64
rm -f $(libdir)/iconv.lib
65
rm -f $(libdir)/iconv.a
70
rm -f *.obj *.lib *.a *.dll core
75
maintainer-clean : distclean