# Copyright (C) 2008 - SEE "AUTHORS" FILE # # This file is part of libtweet. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the # Free Software Foundation, Inc., # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Major rework is a Major release # ABI change is a Minor release # Micro is bug-fix or feature adding MAJOR=0 MINOR=3 MICRO=2 VERSION=$(MAJOR).$(MINOR).$(MICRO) CC = g++ -Wall CFLAGS = -g -fPIC # Create a static archive libtweet.a: obj/Tweet.o obj/xmlParser.o obj/TwitterUser.o obj/TwitterStatusUpdate.o ar -cvr $@ $^ # Create a dynamic library dynamic: obj/Tweet.o obj/xmlParser.o obj/TwitterUser.o obj/TwitterStatusUpdate.o $(CC) -shared -Wl,-soname,libtweet.so.$(MAJOR).$(MINOR) -lc -o libtweet.so.$(VERSION) $^ example: obj/example.o libtweet.a $(CC) $^ -o $@ -lcurl clean: rm -f obj/*.o rm -f libtweet.* rm -f example depend: g++ -MM src/*.cpp | sed 's/^\([a-zA-Z]\)/\nsrc\/\1/' | sed 's/^src/obj/' > temp.mk echo "" >> temp.mk cat temp.mk | sed '1,1d' | sed 's/^$$/\t$$(CC) $$(CFLAGS) -c $$< -o $$@\n/' > dependency.mk rm -f temp.mk include dependency.mk