Skip to content

Commit

Permalink
More Watcom makefile fixes.
Browse files Browse the repository at this point in the history
Added the -br switch to dynamic builds which fixes the issue I saw
with curl's --version output. Added debug info and symfile for debug
builds to linker opts. Added DLL loader for wlink back, but this time
dependend on wlink version.
Patch posted to the list by malak.jiri AT gmail.com.
  • Loading branch information
gknauf committed Aug 10, 2010
1 parent 44e5e37 commit 495d3e0
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 5 deletions.
14 changes: 11 additions & 3 deletions lib/Makefile.Watcom
Expand Up @@ -26,6 +26,11 @@ RC = wrc
! loaddll wcc386 wccd386
! loaddll wpp386 wppd386
! loaddll wlib wlibd
! if $(__VERSION__) < 1280
! loaddll wlink wlinkd
! else
! loaddll wlink wlink
! endif
!endif

MD = mkdir
Expand Down Expand Up @@ -110,7 +115,7 @@ clean: .SYMBOLIC
-$(RM) $(RESOURCE) $(LINK_ARG) $(LIB_ARG)

vclean realclean: clean .SYMBOLIC
-$(RM) $(TARGETS) $(LIBNAME).map
-$(RM) $(TARGETS) $(LIBNAME).map $(LIBNAME).sym
-$(RD) $(OBJ_BASE)\stat
-$(RD) $(OBJ_BASE)\dyn
-$(RD) $(OBJ_BASE)
Expand All @@ -135,7 +140,7 @@ $(RESOURCE): libcurl.rc

.ERASE
.c{$(OBJ_BASE)\dyn}.obj:
$(CC) $(CFLAGS) -bd $[@ -fo=$^@
$(CC) $(CFLAGS) -bd -br $[@ -fo=$^@

.ERASE
.c{$(OBJ_BASE)\stat}.obj:
Expand All @@ -145,9 +150,12 @@ $(LINK_ARG): $(__MAKEFILES__)
%create $^@
@%append $^@ system nt dll
@%append $^@ file { $(OBJS_DYN) }
!ifdef %debug
@%append $^@ debug all
@%append $^@ option symfile
!endif
@%append $^@ option quiet, map, caseexact, eliminate, implib=$(LIBNAME)_imp.lib,
@%append $^@ res=$(RESOURCE) libpath $(SYS_LIBS)
# @%append $^@ library clib3r.lib
@%append $^@ library wldap32.lib
!ifdef %use_watt32
@%append $^@ library $(%watt_root)\lib\wattcpw_imp.lib
Expand Down
13 changes: 11 additions & 2 deletions src/Makefile.Watcom
Expand Up @@ -26,6 +26,11 @@ RC = wrc
! loaddll wcc386 wccd386
! loaddll wpp386 wppd386
! loaddll wlib wlibd
! if $(__VERSION__) < 1280
! loaddll wlink wlinkd
! else
! loaddll wlink wlink
! endif
!endif

MD = mkdir
Expand Down Expand Up @@ -80,6 +85,7 @@ OBJS = $(CURL_CFILES:.c=.obj)
!ifdef %curl_static
CFLAGS += -DCURL_STATICLIB
!else
CFLAGS += -br
OBJS += $(CURLX_SOURCES:.c=.obj)
!endif
OBJS = $OBJ_DIR\$(OBJS: = $OBJ_DIR\)
Expand All @@ -95,7 +101,7 @@ clean: .SYMBOLIC

vclean realclean: clean .SYMBOLIC
-$(RD) $(OBJ_DIR)
-$(RM) curl.exe curl.map hugehelp.c
-$(RM) curl.exe curl.map curl.sym hugehelp.c

hugehelp.c: hugehelp.c.cvs
$(CP) $[@ $^@
Expand Down Expand Up @@ -123,9 +129,12 @@ $(LINK_ARG): $(__MAKEFILES__)
%create $^@
@%append $^@ system nt
@%append $^@ file { $(OBJS) }
!ifdef %debug
@%append $^@ debug all
@%append $^@ option symfile
!endif
@%append $^@ option quiet, map, caseexact, eliminate,
@%append $^@ res=$(RESOURCE) libpath $(SYS_LIBS)
# @%append $^@ library clib3r.lib
!ifdef %curl_static
@%append $^@ library wldap32.lib
@%append $^@ library ..\lib\$(LIBNAME).lib
Expand Down

0 comments on commit 495d3e0

Please sign in to comment.