1#*************************************************************************** 2# _ _ ____ _ 3# Project ___| | | | _ \| | 4# / __| | | | |_) | | 5# | (__| |_| | _ <| |___ 6# \___|\___/|_| \_\_____| 7# 8# Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al. 9# 10# This software is licensed as described in the file COPYING, which 11# you should have received as part of this distribution. The terms 12# are also available at https://curl.haxx.se/docs/copyright.html. 13# 14# You may opt to use, copy, modify, merge, publish, distribute and/or sell 15# copies of the Software, and permit persons to whom the Software is 16# furnished to do so, under the terms of the COPYING file. 17# 18# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 19# KIND, either express or implied. 20# 21########################################################################### 22# 23# Common defines for curl (djgpp/Watt-32) 24# 25# Assumes you've unpacked curl with long-file names 26# I.e use "set LFN=y" before untaring on Win9x/XP. 27# Requires sed, yacc, rm and the usual stuff. 28# 29# Define TOPDIR before including this file. 30 31.SUFFIXES: .exe .y 32 33MAKEFILE = Makefile.dj 34OBJ_DIR = djgpp 35 36# 37# Find out if using a Unix-like shell or a DOS command interpreter 38# 39ifneq ($(findstring COMMAND.COM,$(SHELL)),COMMAND.COM) 40 ifneq ($(findstring CMD.EXE,$(SHELL)),CMD.EXE) 41 ifneq ($(findstring 4DOS.COM,$(SHELL)),4DOS.COM) 42 IS_UNIX_SHELL = 1 43 endif 44 endif 45endif 46 47# 48# Define shell dependent commands and vars 49# 50ifeq ($(IS_UNIX_SHELL),1) 51 COPY = cp -f 52 DELETE = rm -f 53 MKDIR = mkdir 54 RMDIR = rm -f -r 55 DS = / 56else 57 COPY = copy 58 DELETE = del 59 MKDIR = mkdir 60 RMDIR = rmdir 61 DS = \$(NOTHING) 62endif 63 64# 65# OpenSSL is available from www.openssl.org and builds okay 66# with djgpp/Watt-32. Set to 0 if you don't need https URLs 67# (reduces curl.exe with approx 700 kB) 68# 69USE_SSL = 0 70 71# 72# Use zlib for contents encoding 73# 74USE_ZLIB = 0 75 76# 77# Use libidn for international domain names 78# 79USE_IDNA = 0 80 81# 82# Use Watt-32 IPv6 stack (only IPv6 name resolution working at the moment) 83# 84USE_IPV6 = 0 85 86# 87# Use C-Ares resolver library 88# 89USE_ARES = 0 90 91# 92# Enable debug code in libcurl/curl 93# 94USE_DEBUG = 0 95 96# 97# Enable memory tracking code in libcurl/curl 98# 99USE_CURLDEBUG = 0 100 101default: all 102 103# 104# Root directory for Waterloo tcp/ip etc. Change to suite. 105# WATT_ROOT should be set during Watt-32 install. 106# 107WATT32_ROOT = $(subst \,/,$(WATT_ROOT)) 108OPENSSL_ROOT = e:/net/openssl.099 109ZLIB_ROOT = $(DJDIR)/contrib/zlib 110LIBIDN_ROOT = $(TOPDIR)/../IDN/libidn 111ARES_ROOT = $(TOPDIR)/ares 112 113CC = gcc 114YACC = bison -y 115 116CFLAGS = -g -O2 -I. -I$(TOPDIR)/include -I$(TOPDIR)/lib \ 117 -I$(WATT32_ROOT)/inc -Wall -DHAVE_CONFIG_H 118 119ifeq ($(USE_SSL),1) 120 CFLAGS += -DUSE_OPENSSL -I$(OPENSSL_ROOT) 121endif 122 123ifeq ($(USE_ZLIB),1) 124 CFLAGS += -DUSE_ZLIB -I$(ZLIB_ROOT) 125endif 126 127ifeq ($(USE_IPV6),1) 128 CFLAGS += -DENABLE_IPV6 129endif 130 131ifeq ($(USE_ARES),1) 132 CFLAGS += -DUSE_ARES -I$(ARES_ROOT) 133endif 134 135ifeq ($(USE_IDNA),1) 136 CFLAGS += -DHAVE_LIBIDN -DHAVE_IDN_FREE_H -DHAVE_IDN_FREE -DHAVE_TLD_H \ 137 -DHAVE_TLD_STRERROR -I$(LIBIDN_ROOT)/lib 138endif 139 140ifeq ($(USE_DEBUG),1) 141 CFLAGS += -DDEBUG=1 -DDEBUGBUILD 142endif 143 144ifeq ($(USE_CURLDEBUG),1) 145 CFLAGS += -DCURLDEBUG 146endif 147 148$(OBJ_DIR): 149 $(MKDIR) $(OBJ_DIR) 150 151$(OBJ_DIR)/%.o: %.c 152 $(CC) $(CFLAGS) -o $@ -c $< 153 @echo 154 155depend: $(DEPEND_PREREQ) $(MAKEFILE) 156 $(CC) -MM $(CFLAGS) $(CSOURCES) | \ 157 sed -e 's/^\([a-zA-Z0-9_-]*\.o:\)/$$(OBJ_DIR)\/\1/' > depend.dj 158