summaryrefslogtreecommitdiff
path: root/win32/iconv/Makefile.os2
blob: 12a55ad61a044868723a241815f1a039e1c27ba6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# Makefile for libiconv/lib, OS2/EMX specific
#
#	requires EMX/GCC development environment and
#	GNU fileutils and GNU textutils installed
#
#	define EMXPATH=<your EMX path> on install/uninstall
#

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

# Directories used by "make install":
prefix = @prefix@
exec_prefix = $(prefix)
libdir = $(exec_prefix)/lib
shlibdir = $(exec_prefix)/dll

# Programs used by "make":
CC = gcc
CFLAGS = -O2 -Zomf -Zcrtdll -Zmt
INCLUDES = -I. -I../include

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

.SUFFIXES: .obj .o

SOURCES = iconv.c

OBJECTS = iconv.obj

all : iconv.dll iconv.a iconv.lib

config.h : force
	sed -e 's/#undef WORDS_LITTLEENDIAN$$/#define WORDS_LITTLEENDIAN 1/' < config.h.in > config.h

iconv.obj : iconv.c encodings.def encodings_local.def aliases.h config.h
	$(CC) $(INCLUDES) $(CFLAGS) -c iconv.c

iconv.dll : $(OBJECTS) ../os2/iconv.def # DLL itself
	$(CC) -Zdll $(CFLAGS) -o $@ $(OBJECTS) ../os2/iconv.def

iconv.lib : ../os2/iconv.def            # Import Lib. for -Zomf
	rm -f iconv.lib
	emximp -o iconv.lib ../os2/iconv.def

iconv.a : ../os2/iconv.def              # Import Lib. for EMX .o format
	rm -f iconv.a
	emximp -o iconv.a ../os2/iconv.def

# Installs the library and include files only. Typically called with only
# $(libdir), $(shlibdir) and $(includedir) - don't use $(prefix) and
# $(exec_prefix) here.
install-lib : all force
	cp -i iconv.dll $(shlibdir)/iconv.dll
	cp -i iconv.lib $(libdir)/iconv.lib
	cp -i iconv.a   $(libdir)/iconv.a

install : all force
	cp -i iconv.dll $(shlibdir)/iconv.dll
	cp -i iconv.lib $(libdir)/iconv.lib
	cp -i iconv.a   $(libdir)/iconv.a

uninstall : force
	rm -f $(shlibdir)/iconv.dll
	rm -f $(libdir)/iconv.lib
	rm -f $(libdir)/iconv.a

check : all

clean : force
	rm -f *.obj *.lib *.a *.dll core

distclean : clean
	rm -f config.h

maintainer-clean : distclean

force :