-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added an OS/2 makefile for Open Watcom
- Loading branch information
Showing
1 changed file
with
81 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
# Open Watcom makefile to build SDL2ttf.dll for OS/2 | ||
# wmake -f Makefile.os2 | ||
# | ||
# Remember to edit DEPS_INC and DEPS_LIB below to meet | ||
# your own environment!. | ||
|
||
LIBNAME = SDL2ttf | ||
VERSION = 2.0.15 | ||
|
||
TITLENAME = $(LIBNAME) $(VERSION) | ||
|
||
LIBFILE = $(LIBNAME).lib | ||
DLLFILE = $(LIBNAME).dll | ||
LNKFILE = $(LIBNAME).lnk | ||
# change DEPS_INC in order to point to the dependency headers. | ||
DEPS_INC=-IC:\SDL2DEV\h\SDL2 -IC:\SDL2DEV\h | ||
# change DEPS_LIB in order to point to the dependency libraries. | ||
DEPS_LIB=C:\SDL2DEV\lib | ||
|
||
SRCS = SDL_ttf.c | ||
|
||
OBJS = $(SRCS:.c=.obj) | ||
|
||
LIBS = freetype.lib zlib.lib SDL2.lib | ||
|
||
CFLAGS_BASE = -bt=os2 -d0 -q -bm -5s -fp5 -fpi87 -sg -oteanbmier -ei -j | ||
# warnings: | ||
CFLAGS_BASE+= -wx | ||
# include paths: | ||
CFLAGS_BASE+= -I$(%WATCOM)/h/os2 -I$(%WATCOM)/h | ||
CFLAGS_BASE+= -I. $(DEPS_INC) | ||
CFLAGS =$(CFLAGS_BASE) | ||
# to build a dll: | ||
CFLAGS+= -bd | ||
# for DECLSPEC: | ||
CFLAGS+= -DBUILD_SDL | ||
|
||
all: $(LIBFILE) showfont.exe | ||
|
||
$(LIBFILE): $(DLLFILE) | ||
@echo * Create library: $@... | ||
wlib -b -n -q -c -pa -s -t -zld -ii -io $@ $(DLLFILE) | ||
|
||
$(DLLFILE): $(OBJS) $(LNKFILE) | ||
@echo * Link: $@ | ||
wlink @$(LNKFILE) | ||
|
||
$(LNKFILE): | ||
@%create $@ | ||
@%append $@ SYSTEM os2v2_dll INITINSTANCE TERMINSTANCE | ||
@%append $@ NAME $(LIBNAME) | ||
@for %i in ($(OBJS)) do @%append $@ FILE %i | ||
@%append $@ OPTION QUIET | ||
@%append $@ OPTION DESCRIPTION '@$#libsdl org:$(VERSION)$#@Simple DirectMedia Layer truetype font library' | ||
@%append $@ LIBPATH $(DEPS_LIB) | ||
@for %i in ($(LIBS)) do @%append $@ LIB %i | ||
@%append $@ OPTION MAP=$* | ||
@%append $@ OPTION ELIMINATE | ||
@%append $@ OPTION MANYAUTODATA | ||
@%append $@ OPTION OSNAME='OS/2 and eComStation' | ||
@%append $@ OPTION SHOWDEAD | ||
|
||
.c.obj: | ||
wcc386 $(CFLAGS) -fo=$^@ $< | ||
|
||
showfont.obj: showfont.c | ||
wcc386 $(CFLAGS_BASE) -fo=$^@ $< | ||
|
||
showfont.exe: $(LIBFILE) showfont.obj | ||
wlink SYS os2v2 OP q LIBPATH $(DEPS_LIB) LIBR {$(LIBFILE) SDL2.lib} F {showfont.obj} N showfont.exe | ||
|
||
clean: .SYMBOLIC | ||
@echo * Clean: $(TITLENAME) | ||
@if exist *.obj rm *.obj | ||
@if exist *.err rm *.err | ||
@if exist $(LNKFILE) rm $(LNKFILE) | ||
distclean: .SYMBOLIC clean | ||
@if exist $(DLLFILE) rm $(DLLFILE) | ||
@if exist $(LIBFILE) rm $(LIBFILE) | ||
@if exist *.map rm *.map | ||
@if exist *.exe rm *.exe |