google-code-export / twitcurl

Automatically exported from code.google.com/p/twitcurl
1 stars 1 forks source link

Makefile for the latest version of twitCurl #8

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
No Makefile exists for the latest version of twitCurl.  I would like to use 
twitCurl on linux with OAuth support, but there is no Makefile available.

Original issue reported on code.google.com by Felix.Na...@gmail.com on 29 Oct 2010 at 4:52

GoogleCodeExporter commented 9 years ago
Hi,

Yes, no Makefile for the new lib yet!! I have to polish my rusty makefile 
writing skills ;) Will upload soon. If anybody has already written, please feel 
free to post it here. 

Original comment by swatkat....@gmail.com on 6 Nov 2010 at 3:02

GoogleCodeExporter commented 9 years ago
Here's the version that I got to work.  Note, I had to download a new version 
of libcurl since I couldn't compile it with the old version on my system so I 
added a CURL_LIB that would not be needed by people with the latest version of 
libcurl.  By no means is this a production version of the Makefile.  A lot of 
cleanup is needed, and if I have chance to get around to it, I'll update it and 
clean it up.

# Hey Emacs, this is a -*- makefile -*-
# The twitcurl library.. a Makefile for OpenWRT
# Makefile-fu by John Boiles
# 28 September 2009

LIBNAME = twitcurl
SRC = $(LIBNAME).cpp \
    HMAC_SHA1.cpp \
    SHA1.cpp \
    base64.cpp \
    oauthlib.cpp \
    urlencode.cpp
STAGING_DIR = 
INCLUDE_DIR = $(STAGING_DIR)/usr/include
CURL_INCLUDE = /home/qa5535/libcurl/usr/local/include
LIBRARY_DIR = $(STAGING_DIR)/usr/lib
CURL_LIB = /home/qa5535/libcurl/usr/local/lib
LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib
CC = g++
REMOVE = rm -f
COPY = cp
REMOTEIP = 192.168.1.30

# Compiler flag to set the C Standard level.
# c89   - "ANSI" C
# gnu89 - c89 plus GCC extensions
# c99   - ISO C99 standard (not yet fully implemented)
# gnu99 - c99 plus GCC extensions
# CSTANDARD = -std=gnu99

# Place -D or -U options here
CDEFS =

# Place -I options here
CINCS = 

CFLAGS =$(CDEFS) $(CINCS) $(CSTANDARD)

all: target

target: $(SRC) $(LIBNAME).h
    $(CC) -Wall -fPIC -c -I$(CURL_INCLUDE) -I$(INCLUDE_DIR) $(SRC)
    $(CC) -shared -Wl,-soname,lib$(LIBNAME).so.1 $(LDFLAGS) -L$(CURL_LIB) -L$(LIBRARY_DIR) -lcurl -o lib$(LIBNAME).so.1.0 *.o

#clean project.
clean:
    $(REMOVE) $(LIBNAME)*.so.1.0
    $(REMOVE) $(LIBNAME).o
    $(REMOVE) $(LIBRARY_DIR)/lib$(LIBNAME).so*
# Install library to local openwrt library directory
install: all
    $(COPY) lib$(LIBNAME).so.1.0 $(LIBRARY_DIR)
    $(COPY) $(LIBNAME).h $(INCLUDE_DIR)/
    ln -sf $(LIBRARY_DIR)/lib$(LIBNAME).so.1.0 $(LIBRARY_DIR)/lib$(LIBNAME).so
    ln -sf $(LIBRARY_DIR)/lib$(LIBNAME).so.1.0 $(LIBRARY_DIR)/lib$(LIBNAME).so.1

Original comment by Felix.Na...@gmail.com on 8 Nov 2010 at 3:48

GoogleCodeExporter commented 9 years ago
Thanks. Linux branch svn/branches/libtwitcurl has been updated with new code 
and makefile.

Original comment by swatkat....@gmail.com on 6 Mar 2011 at 3:58