Makefile.example 1.9 KB

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