xf.li | 6c8fc1e | 2023-08-12 00:11:09 -0700 | [diff] [blame] | 1 | #*************************************************************************** |
| 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 | |
| 27 | PROOT := .. |
| 28 | |
| 29 | RCFLAGS += -DCURL_EMBED_MANIFEST |
| 30 | CPPFLAGS += -I$(PROOT)/lib |
| 31 | LDFLAGS += -L$(PROOT)/lib |
| 32 | LIBS += -lcurl |
| 33 | |
| 34 | ifneq ($(findstring -dyn,$(CFG)),) |
| 35 | curl_DEPENDENCIES := $(PROOT)/lib/libcurl$(CURL_DLL_SUFFIX).dll |
| 36 | curl_DEPENDENCIES += $(PROOT)/lib/libcurl.dll.a |
| 37 | DYN := 1 |
| 38 | else |
| 39 | curl_DEPENDENCIES := $(PROOT)/lib/libcurl.a |
| 40 | CPPFLAGS += -DCURL_STATICLIB |
| 41 | LDFLAGS += -static |
| 42 | endif |
| 43 | |
| 44 | ### Sources and targets |
| 45 | |
| 46 | # Provides CURL_CFILES, CURLX_CFILES, CURL_RCFILES |
| 47 | include Makefile.inc |
| 48 | |
| 49 | TARGETS := curl.exe |
| 50 | |
| 51 | curl_OBJECTS := $(patsubst %.c,%.o,$(strip $(CURL_CFILES))) |
| 52 | curl_OBJECTS += $(patsubst %.c,%.o,$(notdir $(strip $(CURLX_CFILES)))) |
| 53 | curl_OBJECTS += $(patsubst %.rc,%.res,$(strip $(CURL_RCFILES))) |
| 54 | vpath %.c $(PROOT)/lib |
| 55 | |
| 56 | TOCLEAN := $(curl_OBJECTS) |
| 57 | ifneq ($(wildcard tool_hugehelp.c.cvs),) |
| 58 | TOCLEAN += tool_hugehelp.c |
| 59 | endif |
| 60 | |
| 61 | ### Local rules |
| 62 | |
| 63 | $(TARGETS): $(curl_OBJECTS) $(curl_DEPENDENCIES) |
| 64 | $(CC) $(LDFLAGS) $(CURL_LDFLAGS_BIN) -o $@ $(curl_OBJECTS) $(LIBS) |
| 65 | |
| 66 | tool_hugehelp.c: |
| 67 | @echo Creating $@ |
| 68 | @$(call COPY, $@.cvs, $@) |
| 69 | |
| 70 | ### Global script |
| 71 | |
| 72 | include $(PROOT)/lib/Makefile.m32 |