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