Skip to content

Commit

Permalink
Remove the '_' prefix from symbol names in Windows OpenWatcom builds
Browse files Browse the repository at this point in the history
  • Loading branch information
ccawley2011 authored and sezero committed May 19, 2022
1 parent aa51a97 commit 3d52d04
Show file tree
Hide file tree
Showing 3 changed files with 853 additions and 4 deletions.
11 changes: 7 additions & 4 deletions Makefile.w32
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ DESCRIPTION = Simple DirectMedia Layer 2
LIBHOME = .
DLLFILE = $(LIBHOME)/$(LIBNAME).dll
LIBFILE = $(LIBHOME)/$(LIBNAME).lib
EXPFILE = $(LIBHOME)/$(LIBNAME).exp
LNKFILE = $(LIBNAME).lnk

INCPATH = -I"$(%WATCOM)/h/nt" -I"$(%WATCOM)/h/nt/directx" -I"$(%WATCOM)/h"
Expand All @@ -31,8 +32,9 @@ CFLAGS_STATIC=$(CFLAGS)
# building dll:
CFLAGS_DLL =$(CFLAGS)
CFLAGS_DLL+= -bd
# building SDL itself (for DECLSPEC):
CFLAGS_DLL+= -DDLL_EXPORT
# we override the DECLSPEC define in begin_code.h, because we are using
# an exports file to remove the _cdecl '_' prefix from the symbol names
CFLAGS_DLL+= -DDECLSPEC=

CFLAGS_DLL+= -DSDL_BUILD_MAJOR_VERSION=$(MAJOR_VERSION)
CFLAGS_DLL+= -DSDL_BUILD_MINOR_VERSION=$(MINOR_VERSION)
Expand Down Expand Up @@ -116,7 +118,7 @@ $(DLLFILE): build_dll $(OBJS) $(MOBJS) $(RCOBJS) $(LNKFILE)

$(LIBFILE): $(DLLFILE)
@echo * Creating LIB file: $@
wlib -q -b -n -c -pa -s -t -zld -ii -io $* $(DLLFILE)
wlib -q -b -n -c -pa -s -t -zld -ii -io $* @$(EXPFILE)

.c.obj:
wcc386 $(CFLAGS_DLL) -fo=$^@ $<
Expand Down Expand Up @@ -197,8 +199,9 @@ $(LNKFILE): Makefile.w32
@%append $@ NAME $(DLLFILE)
@for %i in ($(OBJS)) do @%append $@ FILE %i
@for %i in ($(LIBS)) do @%append $@ LIB %i
@%append $@ EXPORT=src/dynapi/SDL2.exports
@%append $@ OPTION QUIET
@%append $@ OPTION IMPF=$(LIBHOME)/$^&.exp
@%append $@ OPTION IMPF=$(EXPFILE)
@%append $@ OPTION MAP=$(LIBHOME)/$^&.map
@%append $@ OPTION DESCRIPTION '@$#libsdl org:$(VERSION)$#@$(DESCRIPTION)'
@%append $@ OPTION ELIMINATE
Expand Down
Loading

0 comments on commit 3d52d04

Please sign in to comment.