1# Makefile for libiconv/lib, OS2/EMX specific 2# 3# requires EMX/GCC development environment and 4# GNU fileutils and GNU textutils installed 5# 6# define EMXPATH=<your EMX path> on install/uninstall 7# 8 9#### Start of system configuration section. #### 10 11# Directories used by "make install": 12prefix = @prefix@ 13exec_prefix = $(prefix) 14libdir = $(exec_prefix)/lib 15shlibdir = $(exec_prefix)/dll 16 17# Programs used by "make": 18CC = gcc 19CFLAGS = -O2 -Zomf -Zcrtdll -Zmt 20INCLUDES = -I. -I../include 21 22#### End of system configuration section. #### 23 24.SUFFIXES: .obj .o 25 26SOURCES = iconv.c 27 28OBJECTS = iconv.obj 29 30all : iconv.dll iconv.a iconv.lib 31 32config.h : force 33 sed -e 's/#undef WORDS_LITTLEENDIAN$$/#define WORDS_LITTLEENDIAN 1/' < config.h.in > config.h 34 35iconv.obj : iconv.c encodings.def encodings_local.def aliases.h config.h 36 $(CC) $(INCLUDES) $(CFLAGS) -c iconv.c 37 38iconv.dll : $(OBJECTS) ../os2/iconv.def # DLL itself 39 $(CC) -Zdll $(CFLAGS) -o $@ $(OBJECTS) ../os2/iconv.def 40 41iconv.lib : ../os2/iconv.def # Import Lib. for -Zomf 42 rm -f iconv.lib 43 emximp -o iconv.lib ../os2/iconv.def 44 45iconv.a : ../os2/iconv.def # Import Lib. for EMX .o format 46 rm -f iconv.a 47 emximp -o iconv.a ../os2/iconv.def 48 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. 52install-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 56 57install : all force 58 cp -i iconv.dll $(shlibdir)/iconv.dll 59 cp -i iconv.lib $(libdir)/iconv.lib 60 cp -i iconv.a $(libdir)/iconv.a 61 62uninstall : force 63 rm -f $(shlibdir)/iconv.dll 64 rm -f $(libdir)/iconv.lib 65 rm -f $(libdir)/iconv.a 66 67check : all 68 69clean : force 70 rm -f *.obj *.lib *.a *.dll core 71 72distclean : clean 73 rm -f config.h 74 75maintainer-clean : distclean 76 77force : 78