improve usability with UNIX-like shells or a DOS command interpreters
This commit is contained in:
parent
0cc8184057
commit
169e94d68b
@ -8,16 +8,14 @@ DEPEND_PREREQ = config.h
|
|||||||
TOPDIR = ..
|
TOPDIR = ..
|
||||||
|
|
||||||
include ../packages/DOS/common.dj
|
include ../packages/DOS/common.dj
|
||||||
|
|
||||||
# Makefile.inc provides the CSOURCES and HHEADERS defines
|
|
||||||
include Makefile.inc
|
include Makefile.inc
|
||||||
|
|
||||||
OBJECTS := $(patsubst %.c,$(OBJ_DIR)/%.o,$(strip $(CSOURCES)))
|
OBJECTS := $(patsubst %.c,$(OBJ_DIR)/%.o,$(strip $(CSOURCES)))
|
||||||
|
|
||||||
CURL_LIB = libcurl.a
|
CURL_LIB = libcurl.a
|
||||||
|
|
||||||
# NOTE: if ../include/curl/curlbuild.h is missing, you're probably building this
|
# NOTE: if ../include/curl/curlbuild.h is missing, you're probably building
|
||||||
# from a CVS checkout and then you need to run buildconf.bat first!
|
# this from a CVS checkout and then you need to run buildconf.bat first.
|
||||||
|
|
||||||
all: $(OBJ_DIR) config.h $(CURL_LIB)
|
all: $(OBJ_DIR) config.h $(CURL_LIB)
|
||||||
|
|
||||||
@ -25,13 +23,28 @@ $(CURL_LIB): $(OBJECTS)
|
|||||||
ar rs $@ $?
|
ar rs $@ $?
|
||||||
|
|
||||||
config.h: config.dos
|
config.h: config.dos
|
||||||
cp $^ $@
|
$(COPY) $^ $@
|
||||||
|
|
||||||
clean:
|
# clean generated files
|
||||||
- rm -f $(OBJECTS)
|
#
|
||||||
|
genclean:
|
||||||
|
- $(DELETE) config.h
|
||||||
|
|
||||||
|
# clean object files and subdir
|
||||||
|
#
|
||||||
|
objclean: genclean
|
||||||
|
- $(DELETE) $(OBJ_DIR)$(DS)*.o
|
||||||
|
- $(RMDIR) $(OBJ_DIR)
|
||||||
|
|
||||||
|
# clean without removing built library
|
||||||
|
#
|
||||||
|
clean: objclean
|
||||||
|
- $(DELETE) depend.dj
|
||||||
|
|
||||||
|
# clean everything
|
||||||
|
#
|
||||||
realclean vclean: clean
|
realclean vclean: clean
|
||||||
- rm -f config.h depend.dj $(CURL_LIB)
|
- $(DELETE) $(CURL_LIB)
|
||||||
|
|
||||||
-include depend.dj
|
-include depend.dj
|
||||||
|
|
||||||
|
@ -13,6 +13,34 @@
|
|||||||
MAKEFILE = Makefile.dj
|
MAKEFILE = Makefile.dj
|
||||||
OBJ_DIR = djgpp
|
OBJ_DIR = djgpp
|
||||||
|
|
||||||
|
#
|
||||||
|
# Find out if using a UNIX-like shell or a DOS command interpreter
|
||||||
|
#
|
||||||
|
ifneq ($(findstring COMMAND.COM,$(SHELL)),COMMAND.COM)
|
||||||
|
ifneq ($(findstring CMD.EXE,$(SHELL)),CMD.EXE)
|
||||||
|
ifneq ($(findstring 4DOS.COM,$(SHELL)),4DOS.COM)
|
||||||
|
IS_UNIX_SHELL = 1
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
#
|
||||||
|
# Define shell dependant commands and vars
|
||||||
|
#
|
||||||
|
ifeq ($(IS_UNIX_SHELL),1)
|
||||||
|
COPY = cp -f
|
||||||
|
DELETE = rm -f
|
||||||
|
MKDIR = mkdir
|
||||||
|
RMDIR = rm -f -r
|
||||||
|
DS = /
|
||||||
|
else
|
||||||
|
COPY = copy
|
||||||
|
DELETE = del
|
||||||
|
MKDIR = mkdir
|
||||||
|
RMDIR = rmdir
|
||||||
|
DS = \$(NOTHING)
|
||||||
|
endif
|
||||||
|
|
||||||
#
|
#
|
||||||
# OpenSSL is available from www.openssl.org and builds okay
|
# OpenSSL is available from www.openssl.org and builds okay
|
||||||
# with djgpp/Watt-32. Set to 0 if you don't need https URLs
|
# with djgpp/Watt-32. Set to 0 if you don't need https URLs
|
||||||
@ -85,11 +113,15 @@ ifeq ($(USE_IDNA),1)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(USE_DEBUG),1)
|
ifeq ($(USE_DEBUG),1)
|
||||||
CFLAGS += -DDEBUG=1 -DCURLDEBUG # -DDPRINTF_DEBUG2=1
|
CFLAGS += -DDEBUG=1 -DDEBUGBUILD
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(USE_CURLDEBUG),1)
|
||||||
|
CFLAGS += -DCURLDEBUG
|
||||||
endif
|
endif
|
||||||
|
|
||||||
$(OBJ_DIR):
|
$(OBJ_DIR):
|
||||||
mkdir $(OBJ_DIR)
|
$(MKDIR) $(OBJ_DIR)
|
||||||
|
|
||||||
$(OBJ_DIR)/%.o: %.c
|
$(OBJ_DIR)/%.o: %.c
|
||||||
$(CC) $(CFLAGS) -o $@ -c $<
|
$(CC) $(CFLAGS) -o $@ -c $<
|
||||||
|
@ -39,14 +39,6 @@ CFLAGS += -DUSE_ENVIRONMENT
|
|||||||
PROGRAM = curl.exe
|
PROGRAM = curl.exe
|
||||||
OBJECTS += $(addprefix $(OBJ_DIR)/, $(CSOURCES:.c=.o))
|
OBJECTS += $(addprefix $(OBJ_DIR)/, $(CSOURCES:.c=.o))
|
||||||
|
|
||||||
ifneq ($(findstring COMMAND.COM,$(SHELL)),COMMAND.COM)
|
|
||||||
ifneq ($(findstring CMD.EXE,$(SHELL)),CMD.EXE)
|
|
||||||
ifneq ($(findstring 4DOS.COM,$(SHELL)),4DOS.COM)
|
|
||||||
IS_UNIX_SHELL = 1
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
all: $(OBJ_DIR) config.h $(PROGRAM)
|
all: $(OBJ_DIR) config.h $(PROGRAM)
|
||||||
@echo Welcome to cURL
|
@echo Welcome to cURL
|
||||||
|
|
||||||
@ -67,11 +59,27 @@ hugehelp.c: ../docs/MANUAL ../docs/curl.1 mkhelp.pl
|
|||||||
groff -Tascii -man ../docs/curl.1 | \
|
groff -Tascii -man ../docs/curl.1 | \
|
||||||
perl -w mkhelp.pl ../docs/MANUAL > $@
|
perl -w mkhelp.pl ../docs/MANUAL > $@
|
||||||
|
|
||||||
clean:
|
# clean generated files
|
||||||
- rm -f $(OBJECTS) config.h
|
#
|
||||||
|
genclean:
|
||||||
|
- $(DELETE) config.h
|
||||||
|
- $(DELETE) hugehelp.c
|
||||||
|
|
||||||
|
# clean object files and subdir
|
||||||
|
#
|
||||||
|
objclean: genclean
|
||||||
|
- $(DELETE) $(OBJ_DIR)$(DS)*.o
|
||||||
|
- $(RMDIR) $(OBJ_DIR)
|
||||||
|
|
||||||
|
# clean without removing built program
|
||||||
|
#
|
||||||
|
clean: objclean
|
||||||
|
- $(DELETE) depend.dj
|
||||||
|
|
||||||
|
# clean everything
|
||||||
|
#
|
||||||
realclean vclean: clean
|
realclean vclean: clean
|
||||||
- rm -f $(PROGRAM) hugehelp.c depend.dj
|
- $(DELETE) $(PROGRAM)
|
||||||
|
|
||||||
-include depend.dj
|
-include depend.dj
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user