makefile (800B)
1 # 2 # Universal iconv implementation for OS/2. 3 # 4 # OpenWatcom makefile to build a library that uses kiconv.dll / iconv2.dll / 5 # iconv.dll or OS/2 Uni*() API. 6 # 7 # Andrey Vasilkin, 2016. 8 # 9 10 LIBFILE = geniconv.lib 11 12 all: $(LIBFILE) test.exe .symbolic 13 14 CFLAGS = -I$(%WATCOM)/h/os2 -I$(%WATCOM)/h -I. -bt=os2 -q -d0 -w2 15 16 SRCS = geniconv.c os2cp.c os2iconv.c 17 SRCS+= sys2utf8.c 18 19 OBJS = $(SRCS:.c=.obj) 20 21 LIBS = libuls.lib libconv.lib $(LIBFILE) 22 23 test.exe: $(LIBFILE) test.obj 24 wlink op quiet system os2v2 file test.obj lib {$(LIBS)} name $* 25 26 $(LIBFILE): $(OBJS) 27 @if exist $@ rm $@ 28 @for %f in ($(OBJS)) do wlib -q -b $* +%f 29 30 .c.obj: 31 wcc386 $(CFLAGS) -fo=$^@ $< 32 33 clean: .SYMBOLIC 34 @if exist *.obj rm *.obj 35 @if exist *.err rm *.err 36 @if exist $(LIBFILE) rm $(LIBFILE) 37 @if exist test.exe rm test.exe