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