source: roaraudio/libroareio/Makefile @ 3098:d2712c3e3e42

Last change on this file since 3098:d2712c3e3e42 was 3098:d2712c3e3e42, checked in by phi, 14 years ago

set soname in most libs

File size: 1.1 KB
Line 
1include ../Makefile.conf
2include ../Makefile.inc
3
4SLIB=libroareio$(SHARED_SUFFIX)
5
6TARGETS=$(SLIB) libroareio.a
7DRIVER=driver.o driver_oss.o esdfw.a
8OBJS=libroareio.o $(DRIVER)
9
10#DEFINES        = -DDEBUG
11INCLUDE = -I../include -I../include/libroareio
12CFLAGS += -g -Wall -O2 $(DEFINES) $(INCLUDE) $(INCPATH) $(SHARED_CF) $(fPIC)
13LDFLAGS = -g $(SHARED) -L../lib/ $(LDPATH)
14LIBS    = $(LIBROAREIO_NS)
15
16all: ${TARGETS}
17        rm -f ../lib/${SLIB} 2> /dev/null || true
18        cp $(cp_v) ${TARGETS} ../lib/
19clean:
20        rm -f ${TARGETS} autodetected.h esdfw.a *.o
21new: clean all
22
23esdfw.a:
24        if [ "`ls esdfw_*.o`" != '' ]; then ${AR} cru esdfw.a esdfw_*.o; else ${AR} cru esdfw.a; fi
25        ${RANLIB} esdfw.a
26
27$(SLIB): ${OBJS}
28        ${CC} ${LDFLAGS} -Wl,-soname,$(SLIB).$(COMMON_V_MAJOR) -o $(SLIB) $(OBJS) $(LIBS)
29libroareio.a: ${OBJS}
30        ${AR} cru libroareio.a ${OBJS}
31        ${RANLIB} libroareio.a
32
33driver.c: autodetected.h
34autodetected.h:
35        echo "/* *** */" > autodetected.h
36        [ -f driver_esdfw.h -a -f driver_esdfw.c ] && echo '#define ROAR_HAVE_AD_ESDFW' >> autodetected.h || true
37        echo "/* *** */" >> autodetected.h
Note: See TracBrowser for help on using the repository browser.