Permalink
Browse files

added shared lib target to Makefile

  • Loading branch information...
1 parent b61c209 commit d45c38fa520b16ed021a06cb16263aa38f4dee3a @pschuegr pschuegr committed Sep 15, 2012
Showing with 5 additions and 1 deletion.
  1. +5 −1 Makefile
View
@@ -15,6 +15,7 @@ DEMOOBJS = $(DEMOSRC:.c=.o)
HEADERS = src/termbox.h
ALL_INCLUDES = $(HEADERS)
+SHARED_LIBS=libtermbox.so
ALL_LIBS=libtermbox.a
ALL_DEMOS=keyboard_demo
@@ -28,7 +29,7 @@ RANLIB = $(CROSS_COMPILE)ranlib
BUILDCFLAGS=$(CFLAGS)
-all: $(ALL_LIBS) $(ALL_DEMOS)
+all: $(ALL_LIBS) $(ALL_DEMOS) $(SHARED_LIBS)
install: $(ALL_LIBS:lib/%=$(DESTDIR)$(libdir)/%) $(ALL_INCLUDES:include/%=$(DESTDIR)$(includedir)/%)
@@ -45,6 +46,9 @@ libtermbox.a: $(LIBOBJS)
$(AR) rc $@ $(LIBOBJS)
$(RANLIB) $@
+libtermbox.so: $(LIBOBJS)
+ gcc -shared -o $(SHARED_LIBS) $(LIBOBJS)
+
keyboard_demo: $(OBJS)
$(CC) $(LDFLAGS) -o $@ $(OBJS)

0 comments on commit d45c38f

Please sign in to comment.