Makefile.example 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. #***************************************************************************
  2. # _ _ ____ _
  3. # Project ___| | | | _ \| |
  4. # / __| | | | |_) | |
  5. # | (__| |_| | _ <| |___
  6. # \___|\___/|_| \_\_____|
  7. #
  8. # Copyright (C) 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. # What to call the final executable
  25. TARGET = example
  26. # Which object files that the executable consists of
  27. OBJS= ftpget.o
  28. # What compiler to use
  29. CC = gcc
  30. # Compiler flags, -g for debug, -c to make an object file
  31. CFLAGS = -c -g
  32. # This should point to a directory that holds libcurl, if it isn't
  33. # in the system's standard lib dir
  34. # We also set a -L to include the directory where we have the openssl
  35. # libraries
  36. LDFLAGS = -L/home/dast/lib -L/usr/local/ssl/lib
  37. # We need -lcurl for the curl stuff
  38. # We need -lsocket and -lnsl when on Solaris
  39. # We need -lssl and -lcrypto when using libcurl with SSL support
  40. # We need -lpthread for the pthread example
  41. LIBS = -lcurl -lsocket -lnsl -lssl -lcrypto
  42. # Link the target with all objects and libraries
  43. $(TARGET) : $(OBJS)
  44. $(CC) -o $(TARGET) $(OBJS) $(LDFLAGS) $(LIBS)
  45. # Compile the source files into object files
  46. ftpget.o : ftpget.c
  47. $(CC) $(CFLAGS) $<