Makefile.example 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #############################################################################
  2. # _ _ ____ _
  3. # Project ___| | | | _ \| |
  4. # / __| | | | |_) | |
  5. # | (__| |_| | _ <| |___
  6. # \___|\___/|_| \_\_____|
  7. #
  8. # $Id$
  9. #
  10. # What to call the final executable
  11. TARGET = example
  12. # Which object files that the executable consists of
  13. OBJS= ftpget.o
  14. # What compiler to use
  15. CC = gcc
  16. # Compiler flags, -g for debug, -c to make an object file
  17. CFLAGS = -c -g
  18. # This should point to a directory that holds libcurl, if it isn't
  19. # in the system's standard lib dir
  20. # We also set a -L to include the directory where we have the openssl
  21. # libraries
  22. LDFLAGS = -L/home/dast/lib -L/usr/local/ssl/lib
  23. # We need -lcurl for the curl stuff
  24. # We need -lsocket and -lnsl when on Solaris
  25. # We need -lssl and -lcrypto when using libcurl with SSL support
  26. # We need -lpthread for the pthread example
  27. LIBS = -lcurl -lsocket -lnsl -lssl -lcrypto
  28. # Link the target with all objects and libraries
  29. $(TARGET) : $(OBJS)
  30. $(CC) -o $(TARGET) $(OBJS) $(LDFLAGS) $(LIBS)
  31. # Compile the source files into object files
  32. ftpget.o : ftpget.c
  33. $(CC) $(CFLAGS) $<