Skip to content
Snippets Groups Projects
Commit 9df82573 authored by Guenter Knauf's avatar Guenter Knauf
Browse files

Some more Watcom makefile massage ...

For now removed the .autodepend directive until I've figured out
which of my changes broke it again.
parent 992ceae3
No related branches found
No related tags found
No related merge requests found
......@@ -10,7 +10,10 @@ SYS_INCL = -I$(%watcom)\h\nt -I$(%watcom)\h
SYS_LIBS = $(%watcom)\lib386\nt;$(%watcom)\lib386
!endif
TARGETS = libcurl_wc.dll libcurl_wc_imp.lib libcurl_wc.lib
!ifndef %libname
LIBNAME = libcurl
!endif
TARGETS = $(LIBNAME).dll $(LIBNAME)_imp.lib $(LIBNAME).lib
CC = wcc386
LD = wlink
......@@ -99,48 +102,48 @@ RESOURCE = $(OBJ_BASE)\dyn\libcurl.res
all: $(CURLBUILDH) $(OBJ_BASE) $(TARGETS) .SYMBOLIC
@echo Welcome to libcurl
$(OBJ_BASE):
-$(MD) $^@
-$(MD) $^@\stat
-$(MD) $^@\dyn
$(CURLBUILDH): .EXISTSONLY
$(CP) $^@.dist $^@
libcurl_wc.dll libcurl_wc_imp.lib: $(OBJS_DYN) $(RESOURCE) $(LINK_ARG)
$(LD) name libcurl_wc.dll @$(LINK_ARG)
libcurl_wc.lib: $(OBJS_STAT) $(LIB_ARG)
$(AR) -q -b -c $^@ @$(LIB_ARG)
clean: .SYMBOLIC
-$(RM) $(OBJS_STAT)
-$(RM) $(OBJS_DYN)
-$(RM) $(RESOURCE) $(LINK_ARG) $(LIB_ARG)
vclean realclean: clean .SYMBOLIC
-$(RM) $(TARGETS) libcurl_wc.map
-$(RM) $(TARGETS) $(LIBNAME).map
-$(RD) $(OBJ_BASE)\stat
-$(RD) $(OBJ_BASE)\dyn
-$(RD) $(OBJ_BASE)
$(OBJ_BASE):
-$(MD) $^@
-$(MD) $^@\stat
-$(MD) $^@\dyn
$(CURLBUILDH): .EXISTSONLY
$(CP) $^@.dist $^@
$(LIBNAME).dll: $(OBJS_DYN) $(RESOURCE) $(LINK_ARG)
$(LD) name $^@ @$]@
$(LIBNAME).lib: $(OBJS_STAT) $(LIB_ARG)
$(AR) -q -b -c $^@ @$]@
.ERASE
$(RESOURCE): libcurl.rc
$(RC) $(DEBUG) -q -r -zm -I..\include $(SYS_INCL) $[@ -fo=$^@
.ERASE
.c{$(OBJ_BASE)\dyn}.obj: .AUTODEPEND
.c{$(OBJ_BASE)\dyn}.obj:
$(CC) $(CFLAGS) -bd $[@ -fo=$^@
.ERASE
.c{$(OBJ_BASE)\stat}.obj: .AUTODEPEND
.c{$(OBJ_BASE)\stat}.obj:
$(CC) $(CFLAGS) -DCURL_STATICLIB $[@ -fo=$^@
$(LINK_ARG): $(__MAKEFILES__)
%create $^@
@%append $^@ system nt dll
@%append $^@ file { $(OBJS_DYN) }
@%append $^@ option quiet, map, caseexact, eliminate, implib=libcurl_wc_imp.lib,
@%append $^@ option quiet, map, caseexact, eliminate, implib=$(LIBNAME)_imp.lib,
@%append $^@ res=$(RESOURCE) libpath $(SYS_LIBS)
# @%append $^@ library clib3r.lib
@%append $^@ library wldap32.lib
......
......@@ -84,6 +84,14 @@ RESOURCE = $(OBJ_DIR)\curl.res
all: hugehelp.c $(OBJ_DIR) curl.exe .SYMBOLIC
@echo Welcome to cURL
clean: .SYMBOLIC
-$(RM) $(OBJS)
-$(RM) $(RESOURCE) $(LINK_ARG)
vclean realclean: clean .SYMBOLIC
-$(RD) $(OBJ_DIR)
-$(RM) curl.exe curl.map hugehelp.c
hugehelp.c: hugehelp.c.cvs
$(CP) $[@ $^@
......@@ -94,7 +102,17 @@ $(OBJ_DIR):
-$(MD) $^@
curl.exe: $(OBJS) $(RESOURCE) $(LINK_ARG)
$(LD) name $^@ @$(LINK_ARG)
$(LD) name $^@ @$]@
$(RESOURCE): curl.rc
$(RC) $(DEBUG) -q -r -zm -I..\include $(SYS_INCL) $[@ -fo=$^@
# suffix search path - vpath-like hack
.c: ..\lib
.ERASE
.c{$(OBJ_DIR)}.obj:
$(CC) $(CFLAGS) $[@ -fo=$^@
$(LINK_ARG): $(__MAKEFILES__)
%create $^@
......@@ -105,7 +123,7 @@ $(LINK_ARG): $(__MAKEFILES__)
# @%append $^@ library clib3r.lib
!ifdef %curl_static
@%append $^@ library wldap32.lib
@%append $^@ library ..\lib\libcurl_wc.lib
@%append $^@ library ..\lib\libcurl.lib
!ifdef %use_zlib
@%append $^@ library $(ZLIB_ROOT)\zlib.lib
!endif
......@@ -113,7 +131,7 @@ $(LINK_ARG): $(__MAKEFILES__)
@%append $^@ library $(ARES_ROOT)\cares.lib
!endif
!else
@%append $^@ library ..\lib\libcurl_wc_imp.lib
@%append $^@ library ..\lib\libcurl_imp.lib
!endif
!ifeq USE_WATT32 1
@%append $^@ library $(%watt_root)\lib\wattcpw_imp.lib
......@@ -121,21 +139,3 @@ $(LINK_ARG): $(__MAKEFILES__)
@%append $^@ library ws2_32.lib
!endif
clean: .SYMBOLIC
-$(RM) $(OBJS)
-$(RM) $(RESOURCE) $(LINK_ARG)
vclean realclean: clean .SYMBOLIC
-$(RD) $(OBJ_DIR)
-$(RM) curl.exe curl.map hugehelp.c
$(RESOURCE): curl.rc
$(RC) $(DEBUG) -q -r -zm -I..\include $(SYS_INCL) $[@ -fo=$^@
# suffix search path - vpath-like hack
.c: ..\lib
.ERASE
.c{$(OBJ_DIR)}.obj: .AUTODEPEND
$(CC) $(CFLAGS) $[@ -fo=$^@
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment