source: roaraudio/libroareio/Makefile @ 4748:d7be1c18ccb5

Last change on this file since 4748:d7be1c18ccb5 was 4748:d7be1c18ccb5, checked in by phi, 12 years ago

updated configure script to honor LDFLAGS and added --opti to set optimizer level (Closes: #27)

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