From 0c9ff5bb030fd07706c39b3d4f28cef618dd8794 Mon Sep 17 00:00:00 2001 From: Christian Hergert Date: Wed, 8 Feb 2012 03:07:48 -0800 Subject: Add GLib 2.0 adapter [Cleaned up Makefile and header includes. Didn't change crazy coding style because it's the convention for GLib systems.] Closes #83 Closes #71 --- Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index ddcc4e4..09a6ef5 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ # This file is released under the BSD license, see the COPYING file OBJ=net.o hiredis.o sds.o async.o -EXAMPLES=hiredis-example hiredis-example-libevent hiredis-example-libev +EXAMPLES=hiredis-example hiredis-example-libevent hiredis-example-libev hiredis-example-glib TESTS=hiredis-test LIBNAME=libhiredis @@ -79,6 +79,9 @@ hiredis-example-libevent: examples/example-libevent.c adapters/libevent.h $(STLI hiredis-example-libev: examples/example-libev.c adapters/libev.h $(STLIBNAME) $(CC) -o examples/$@ $(REAL_CFLAGS) $(REAL_LDFLAGS) -I. $< -lev $(STLIBNAME) +hiredis-example-glib: examples/example-glib.c adapters/glib.h $(STLIBNAME) + $(CC) -o examples/$@ $(REAL_CFLAGS) $(REAL_LDFLAGS) $(shell pkg-config --cflags --libs glib-2.0) -I. $< $(STLIBNAME) + ifndef AE_DIR hiredis-example-ae: @echo "Please specify AE_DIR (e.g. /src)" @@ -103,6 +106,8 @@ hiredis-example: examples/example.c $(STLIBNAME) examples: $(EXAMPLES) hiredis-test: test.o $(STLIBNAME) + +hiredis-%: %.o $(STLIBNAME) $(CC) -o $@ $(REAL_LDFLAGS) $< $(STLIBNAME) test: hiredis-test -- cgit v1.2.3