mirror of https://github.com/encounter/SDL.git
more updates to os2 makefile for libiconv
This commit is contained in:
parent
b6d40b29a9
commit
615f7b4453
14
Makefile.os2
14
Makefile.os2
|
@ -1,8 +1,8 @@
|
||||||
# Open Watcom makefile to build SDL2.dll for OS/2
|
# Open Watcom makefile to build SDL2.dll for OS/2
|
||||||
# wmake -f Makefile.os2
|
# wmake -f Makefile.os2
|
||||||
#
|
#
|
||||||
# If you have libiconv installed, you can compile against it
|
# If you have GNU libiconv installed (iconv2.dll), you
|
||||||
# by specifying LIBICONV=1, e.g.:
|
# can compile against it by specifying LIBICONV=1, e.g.:
|
||||||
# wmake -f Makefile.os2 LIBICONV=1
|
# wmake -f Makefile.os2 LIBICONV=1
|
||||||
|
|
||||||
LIBNAME = SDL2
|
LIBNAME = SDL2
|
||||||
|
@ -10,8 +10,7 @@ VERSION = 2.0.19
|
||||||
DESCRIPTION = Simple DirectMedia Layer 2
|
DESCRIPTION = Simple DirectMedia Layer 2
|
||||||
|
|
||||||
LIBICONV=0
|
LIBICONV=0
|
||||||
# iconv.lib or iconv2.lib:
|
ICONVLIB=$(LIBICONV_LIB)
|
||||||
ICONVLIB=iconv.lib
|
|
||||||
|
|
||||||
LIBHOME = .
|
LIBHOME = .
|
||||||
DLLFILE = $(LIBHOME)/$(LIBNAME).dll
|
DLLFILE = $(LIBHOME)/$(LIBNAME).dll
|
||||||
|
@ -31,6 +30,7 @@ CFLAGS+= -wcd=303
|
||||||
# building dll:
|
# building dll:
|
||||||
CFLAGS+= -bd
|
CFLAGS+= -bd
|
||||||
# iconv:
|
# iconv:
|
||||||
|
LIBICONV_LIB=iconv2.lib
|
||||||
!ifeq LIBICONV 1
|
!ifeq LIBICONV 1
|
||||||
CFLAGS+= -DHAVE_ICONV=1 -DHAVE_ICONV_H=1
|
CFLAGS+= -DHAVE_ICONV=1 -DHAVE_ICONV_H=1
|
||||||
LIBS+= $(ICONVLIB)
|
LIBS+= $(ICONVLIB)
|
||||||
|
@ -105,7 +105,7 @@ MOBJS= $(MSRCS:.c=.obj)
|
||||||
|
|
||||||
all: $(DLLFILE) $(LIBFILE) .symbolic
|
all: $(DLLFILE) $(LIBFILE) .symbolic
|
||||||
|
|
||||||
$(DLLFILE): $(OBJS) $(LIBM) $(LNKFILE)
|
$(DLLFILE): $(OBJS) $(LIBM) $(LIBICONV_LIB) $(LNKFILE)
|
||||||
@echo * Linking: $@
|
@echo * Linking: $@
|
||||||
wlink @$(LNKFILE)
|
wlink @$(LNKFILE)
|
||||||
|
|
||||||
|
@ -148,6 +148,9 @@ SDL_hidapi.obj: SDL_hidapi.c
|
||||||
$(LIBM): $(MOBJS)
|
$(LIBM): $(MOBJS)
|
||||||
wlib -q -b -n -c -pa -s -t -zld -ii -io $@ $(MOBJS)
|
wlib -q -b -n -c -pa -s -t -zld -ii -io $@ $(MOBJS)
|
||||||
|
|
||||||
|
$(LIBICONV_LIB): "src/core/os2/iconv2.lbc"
|
||||||
|
wlib -q -b -n -c -pa -s -t -zld -ii -io $@ @$<
|
||||||
|
|
||||||
$(LNKFILE):
|
$(LNKFILE):
|
||||||
@echo * Creating linker file: $@
|
@echo * Creating linker file: $@
|
||||||
@%create $@
|
@%create $@
|
||||||
|
@ -170,6 +173,7 @@ clean: .SYMBOLIC
|
||||||
@if exist *.err rm *.err
|
@if exist *.err rm *.err
|
||||||
@if exist $(LNKFILE) rm $(LNKFILE)
|
@if exist $(LNKFILE) rm $(LNKFILE)
|
||||||
@if exist $(LIBM) rm $(LIBM)
|
@if exist $(LIBM) rm $(LIBM)
|
||||||
|
@if exist $(LIBICONV_LIB) rm $(LIBICONV_LIB)
|
||||||
|
|
||||||
distclean: .SYMBOLIC clean
|
distclean: .SYMBOLIC clean
|
||||||
@if exist $(LIBHOME)/*.exp rm $(LIBHOME)/*.exp
|
@if exist $(LIBHOME)/*.exp rm $(LIBHOME)/*.exp
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
# OpenWatcom exports file for libiconv
|
||||||
|
++'libiconv'.'ICONV2'..'_libiconv'
|
||||||
|
++'libiconv_close'.'ICONV2'..'_libiconv_close'
|
||||||
|
++'libiconv_open'.'ICONV2'..'_libiconv_open'
|
Loading…
Reference in New Issue