1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147
|
#############################################################
#
# Makefile for building libcurlpp examples with MSVC
# All examples are linked against curlpp release static library
# Giuseppe "Cowo" Corbelli - cowo at lugbs dot linux dot it
#
# Usage: nmake -f Makefile.msvc all
# Should be invoked from examples/ directory
# Edit the LIBCURL_PATH/BOOST_PATH or set LIBCURL_PATH/BOOST_PATH env vars
#
##############################################################
CURLPP_LIB_NAME = curlpp.lib
CURL_LIB_NAME = libcurl.lib
#############################################################
!IFNDEF LIBCURL_PATH
LIBCURL_PATH = ../../curl/include
!ENDIF
!IF "$(cfg)"=="DebugStatic" || "$(cfg)"=="DebugDynamic"
CC = cl.exe /MDd /Od /Gm /Zi /D_DEBUG /GR /EHsc
!ELSE
CC = cl.exe /MD /O2 /DNDEBUG /GR /Y- /EHsc
!ENDIF
CFLAGS = /I ../include /I ../include/curlpp /I "$(LIBCURL_PATH)/include" /DCURLPP_STATICLIB /D_CRT_SECURE_NO_DEPRECATE /nologo /W3 /DWIN32 /FD /c
!IFDEF BOOST_PATH
CFLAGS = /I $(BOOST_PATH) $(CFLAGS)
!ENDIF
LNKLIB = link.exe /INCREMENTAL:NO /OPT:NOREF
LFLAGS = /nologo /LIBPATH:"$(LIBCURL_PATH)\lib" /LIBPATH:"..\$(cfg)" $(CURLPP_LIB_NAME) $(CURL_LIB_NAME)
LNK = $(LNKLIB) $(LFLAGS)
example01 : $$(@B).o
$(LNK) /out:$@.exe $**
example02 : $$(@B).o
$(LNK) /out:$@.exe $**
example03 : $$(@B).o
$(LNK) /out:$@.exe $**
example04 : $$(@B).o
$(LNK) /out:$@.exe $**
example05 : $$(@B).o
$(LNK) /out:$@.exe $**
example06 : $$(@B).o
$(LNK) /out:$@.exe $**
example07 : $$(@B).o
$(LNK) /out:$@.exe $**
example08 : $$(@B).o
$(LNK) /out:$@.exe $**
example09 : $$(@B).o
$(LNK) /out:$@.exe $**
example10 : $$(@B).o
$(LNK) /out:$@.exe $**
example11 : $$(@B).o
$(LNK) /out:$@.exe $**
example12 : $$(@B).o
$(LNK) /out:$@.exe $**
example13 : $$(@B).o
$(LNK) Ws2_32.lib /out:$@.exe $**
example14 : $$(@B).o
$(LNK) Ws2_32.lib /out:$@.exe $**
example15 : $$(@B).o
$(LNK) /out:$@.exe $**
example16 : $$(@B).o
$(LNK) /out:$@.exe $**
example17 : $$(@B).o
$(LNK) /out:$@.exe $**
example18 : $$(@B).o
$(LNK) /out:$@.exe $**
example19 : $$(@B).o
$(LNK) /out:$@.exe $**
example20 : $$(@B).o
$(LNK) /out:$@.exe $**
example21 : $$(@B).o
$(LNK) /out:$@.exe $**
example22 : $$(@B).o
$(LNK) /out:$@.exe $**
TARGET = \
example01 \
example02 \
example03 \
example04 \
example05 \
example06 \
example07 \
example08 \
example09 \
example10 \
example11 \
example12 \
example13 \
example14 \
example15 \
example16 \
example17 \
example18 \
example19 \
example20 \
example21 \
example22
all : $(TARGET) copy_curlpp
rebuild: clean all
clean:
@echo Cleaning...
del *.o *.exe >NUL 2>&1
copy_curlpp:
!IF "$(cfg)"=="DebugDynamic" || "$(cfg)"=="ReleaseDynamic"
copy ..\$(cfg)\curlpp.dll .\
!ENDIF
.SUFFIXES: .cpp .o
.cpp.o:
$(CC) $(CFLAGS) /Fo"$@" $<
|