blob: 096e09399033d80b1e1ae08376bcb2fc8c646687 [file] [log] [blame]
xf.li6c8fc1e2023-08-12 00:11:09 -07001#***************************************************************************
2# _ _ ____ _
3# Project ___| | | | _ \| |
4# / __| | | | |_) | |
5# | (__| |_| | _ <| |___
6# \___|\___/|_| \_\_____|
7#
8# Copyright (C) 1999 - 2022, 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.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# SPDX-License-Identifier: curl
22#
23#***************************************************************************
24
25# See usage in lib/Makefile.m32
26
27PROOT := ..
28
29RCFLAGS += -DCURL_EMBED_MANIFEST
30CPPFLAGS += -I$(PROOT)/lib
31LDFLAGS += -L$(PROOT)/lib
32LIBS += -lcurl
33
34ifneq ($(findstring -dyn,$(CFG)),)
35 curl_DEPENDENCIES := $(PROOT)/lib/libcurl$(CURL_DLL_SUFFIX).dll
36 curl_DEPENDENCIES += $(PROOT)/lib/libcurl.dll.a
37 DYN := 1
38else
39 curl_DEPENDENCIES := $(PROOT)/lib/libcurl.a
40 CPPFLAGS += -DCURL_STATICLIB
41 LDFLAGS += -static
42endif
43
44### Sources and targets
45
46# Provides CURL_CFILES, CURLX_CFILES, CURL_RCFILES
47include Makefile.inc
48
49TARGETS := curl.exe
50
51curl_OBJECTS := $(patsubst %.c,%.o,$(strip $(CURL_CFILES)))
52curl_OBJECTS += $(patsubst %.c,%.o,$(notdir $(strip $(CURLX_CFILES))))
53curl_OBJECTS += $(patsubst %.rc,%.res,$(strip $(CURL_RCFILES)))
54vpath %.c $(PROOT)/lib
55
56TOCLEAN := $(curl_OBJECTS)
57ifneq ($(wildcard tool_hugehelp.c.cvs),)
58TOCLEAN += tool_hugehelp.c
59endif
60
61### Local rules
62
63$(TARGETS): $(curl_OBJECTS) $(curl_DEPENDENCIES)
64 $(CC) $(LDFLAGS) $(CURL_LDFLAGS_BIN) -o $@ $(curl_OBJECTS) $(LIBS)
65
66tool_hugehelp.c:
67 @echo Creating $@
68 @$(call COPY, $@.cvs, $@)
69
70### Global script
71
72include $(PROOT)/lib/Makefile.m32