Initial revision
[TestXSLT.git] / libiconv / lib / Makefile.os2
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":
12 prefix = @prefix@
13 exec_prefix = $(prefix)
14 libdir = $(exec_prefix)/lib
15 shlibdir = $(exec_prefix)/dll
16
17 # Programs used by "make":
18 CC = gcc
19 CFLAGS = -O2 -Zomf -Zcrtdll -Zmt
20 INCLUDES = -I. -I../include
21
22 #### End of system configuration section. ####
23
24 .SUFFIXES: .obj .o
25
26 SOURCES = iconv.c
27
28 OBJECTS = iconv.obj
29
30 all : iconv.dll iconv.a iconv.lib
31
32 config.h : force
33         sed -e 's/#undef WORDS_LITTLEENDIAN$$/#define WORDS_LITTLEENDIAN 1/' < config.h.in > config.h
34
35 iconv.obj : iconv.c encodings.def encodings_local.def aliases.h config.h
36         $(CC) $(INCLUDES) $(CFLAGS) -c iconv.c
37
38 iconv.dll : $(OBJECTS) ../os2/iconv.def # DLL itself
39         $(CC) -Zdll $(CFLAGS) -o $@ $(OBJECTS) ../os2/iconv.def
40
41 iconv.lib : ../os2/iconv.def            # Import Lib. for -Zomf
42         rm -f iconv.lib
43         emximp -o iconv.lib ../os2/iconv.def
44
45 iconv.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.
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
56
57 install : 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
62 uninstall : force
63         rm -f $(shlibdir)/iconv.dll
64         rm -f $(libdir)/iconv.lib
65         rm -f $(libdir)/iconv.a
66
67 check : all
68
69 clean : force
70         rm -f *.obj *.lib *.a *.dll core
71
72 distclean : clean
73         rm -f config.h
74
75 maintainer-clean : distclean
76
77 force :