makefile.dj 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. #***************************************************************************
  2. # _ _ ____ _
  3. # Project ___| | | | _ \| |
  4. # / __| | | | |_) | |
  5. # | (__| |_| | _ <| |___
  6. # \___|\___/|_| \_\_____|
  7. #
  8. # Copyright (C) 2003 - 2022, Gisle Vanem <gvanem@yahoo.no>.
  9. # Copyright (C) 2003 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  10. #
  11. # This software is licensed as described in the file COPYING, which
  12. # you should have received as part of this distribution. The terms
  13. # are also available at https://curl.se/docs/copyright.html.
  14. #
  15. # You may opt to use, copy, modify, merge, publish, distribute and/or sell
  16. # copies of the Software, and permit persons to whom the Software is
  17. # furnished to do so, under the terms of the COPYING file.
  18. #
  19. # This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
  20. # KIND, either express or implied.
  21. #
  22. # SPDX-License-Identifier: curl
  23. #
  24. #***************************************************************************
  25. #
  26. # Adapted for djgpp2 / Watt-32 / DOS
  27. #
  28. DEPEND_PREREQ = # tool_hugehelp.c
  29. TOPDIR = ..
  30. vpath %.c ../lib
  31. include ../packages/DOS/common.dj
  32. include Makefile.inc
  33. CSOURCES = $(CURL_CFILES) $(CURLX_CFILES)
  34. ifeq ($(USE_OPENSSL),1)
  35. EX_LIBS += $(OPENSSL_LIBS)
  36. endif
  37. ifeq ($(USE_ARES),1)
  38. EX_LIBS += $(ARES_ROOT)/libcares.a
  39. endif
  40. ifeq ($(USE_ZLIB),1)
  41. EX_LIBS += $(ZLIB_ROOT)/libz.a
  42. CFLAGS += -DUSE_MANUAL
  43. endif
  44. ifeq ($(USE_IDNA),1)
  45. EX_LIBS += $(LIBIDN_ROOT)/lib/dj_obj/libidn.a -liconv
  46. endif
  47. EX_LIBS += $(WATT32_ROOT)/lib/libwatt.a
  48. PROGRAM = curl.exe
  49. OBJECTS = $(addprefix $(OBJ_DIR)/, $(notdir $(CSOURCES:.c=.o)))
  50. all: $(OBJ_DIR) $(PROGRAM)
  51. @echo Welcome to curl
  52. $(PROGRAM): $(OBJECTS) ../lib/libcurl.a
  53. $(CC) -o $@ $^ $(LDFLAGS) $(EX_LIBS)
  54. #
  55. # groff 1.18+ requires "-P -c"
  56. # If 'USE_ZLIB = 1', create a compressed help-file.
  57. #
  58. ifeq ($(USE_ZLIB),1)
  59. COMPRESS_OPT = -c
  60. endif
  61. tool_hugehelp.c: ../docs/curl.1 mkhelp.pl Makefile.dj
  62. groff -Tascii -man $< | perl -w mkhelp.pl $(COMPRESS_OPT) $< > $@
  63. # clean generated files
  64. #
  65. genclean:
  66. - $(DELETE) tool_hugehelp.c
  67. # clean object files and subdir
  68. #
  69. objclean: genclean
  70. - $(DELETE) $(OBJ_DIR)$(DS)*.o
  71. - $(RMDIR) $(OBJ_DIR)
  72. # clean without removing built program
  73. #
  74. clean: objclean
  75. - $(DELETE) depend.dj
  76. # clean everything
  77. #
  78. realclean vclean: clean
  79. - $(DELETE) $(PROGRAM)
  80. -include depend.dj