-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile.os2
80 lines (65 loc) · 2.14 KB
/
Makefile.os2
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
78
79
80
# Open Watcom makefile to build SDLgfx.dll for OS/2
# wmake -f Makefile.os2
#
# Remember to edit DEPS_INC and DEPS_LIB below to meet
# your own environment!
LIBNAME = SDLgfx
VERSION = 2.0.27
TITLENAME = $(LIBNAME) $(VERSION)
# change DEPS_INC in order to point to the dependency headers.
DEPS_INC=-IC:\SDLDEV\h\SDL
# change DEPS_LIB in order to point to the dependency libraries.
DEPS_LIB=C:\SDLDEV\lib
LIBFILE = $(LIBNAME).lib
DLLFILE = $(LIBNAME).dll
LNKFILE = $(LIBNAME).lnk
SRCS = SDL_framerate.c SDL_gfxPrimitives.c SDL_imageFilter.c SDL_rotozoom.c SDL_gfxBlitFunc.c
OBJS = $(SRCS:.c=.obj)
LIBS = SDL12.lib
CFLAGS_BASE = -bt=os2 -d0 -q -bm -5s -fp5 -fpi87 -sg -oeatxh -ei -j
# warnings:
CFLAGS_BASE+= -wx
# include paths:
CFLAGS_BASE+= $(DEPS_INC)
CFLAGS_BASE+= -I"$(%WATCOM)/h/os2" -I"$(%WATCOM)/h"
CFLAGS = $(CFLAGS_BASE)
# to build a dll:
CFLAGS+= -bd -DDLL_EXPORT
# mmx support:
# FIXME: Watcom doesn't support align directive in inline asm :
# https://github.com/open-watcom/open-watcom-v2/issues/521
CFLAGS+= -DUSE_MMX
# newer OpenWatcom versions enable W303 by default:
CFLAGS+= -wcd=303
all: $(DLLFILE) $(LIBFILE)
$(LIBFILE): $(DLLFILE)
@echo * Create library: $@...
wlib -b -n -q -c -pa -s -t -zld -ii -io $@ $(DLLFILE)
$(DLLFILE): $(OBJS) $(TIMILIB) $(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 '@$#ferzkopp.net:$(VERSION)$#@Simple DirectMedia Layer graphics extension.'
@%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=$^@ $<
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