ref: 60fa9e81165a47bf492e0835459e2dedf72df660
parent: af9a8b0075884a0e41bc9c95b0511d5bc96fcae6
author: oxygene2000 <oxygene2000>
date: Fri May 11 19:53:58 EDT 2001
- new makefile for unix-like systems (should also work with cygwin) based on autoconf/-make and libtool
--- a/Makefile
+++ /dev/null
@@ -1,15 +1,0 @@
-all:
- make -C libfaac
- make -C frontend
-
-install:
- make -C libfaac $@
- make -C frontend $@
-
-uninstall:
- make -C libfaac $@
- make -C frontend $@
-
-clean:
- make -C libfaac $@
- make -C frontend $@
--- /dev/null
+++ b/Makefile.am
@@ -1,0 +1,2 @@
+SUBDIRS = libfaac frontend
+
--- /dev/null
+++ b/bootstrap
@@ -1,0 +1,7 @@
+#!/bin/sh
+
+aclocal
+libtoolize --automake
+automake --add-missing
+autoconf
+
--- /dev/null
+++ b/configure.in
@@ -1,0 +1,10 @@
+AC_INIT()
+AM_INIT_AUTOMAKE(faac,1.0beta)
+
+AC_PROG_CC
+AM_PROG_LIBTOOL
+
+AC_CHECK_LIB(sndfile, sf_open_read)
+
+AC_OUTPUT(libfaac/Makefile frontend/Makefile Makefile)
+
--- a/frontend/Makefile
+++ /dev/null
@@ -1,16 +1,0 @@
-prefix = /usr/local
-
-CFLAGS := -L../libfaac -I../include $(CFLAGS)
-
-faac: main.c
- gcc $(CFLAGS) -o faac -lfaac -lsndfile main.c
-
-install: faac
- mkdir -p $(prefix)/bin
- cp faac $(prefix)/bin
-
-uninstall:
- rm -f $(prefix)/bin/faac
-
-clean:
- rm -f faac *.o
--- /dev/null
+++ b/frontend/Makefile.am
@@ -1,0 +1,9 @@
+bin_PROGRAMS = faac
+
+faac_SOURCES = main.c
+
+CXXFLAGS = -O2
+INCLUDES = -I$(top_srcdir)/include
+LDFLAGS =
+LDADD = $(top_builddir)/libfaac/libfaac.la -lm -lsndfile
+
--- a/libfaac/Makefile
+++ /dev/null
@@ -1,48 +1,0 @@
-prefix = /usr/local
-
-MIN = 'min(a,b)=( (a) < (b) ? (a) : (b) )'
-MAX = 'max(a,b)=( (a) > (b) ? (a) : (b) )'
-
-#CFLAGS := -ansi -pedantic $(CFLAGS)
-CFLAGS := -DHAS_ULONG -D$(MIN) -D$(MAX) $(CFLAGS)
-
-SRC= \
-aacquant.c \
-bitstream.c \
-channels.c \
-fft.c \
-filtbank.c \
-frame.c \
-huffman.c \
-joint.c \
-ltp.c \
-psych.c \
-tns.c \
-util.c
-
-OBJ = $(SRC:.c=.o)
-
-all: libfaac.a libfaac.so
-
-libfaac.so: $(OBJ)
- gcc -shared -o libfaac.so $(OBJ) -lm
-
-libfaac.a: $(OBJ)
- ar rcs $@ $(OBJ)
- ranlib $@
-
-install: libfaac.so libfaac.a
- mkdir -p $(prefix)/include
- mkdir -p $(prefix)/lib
- cp ../include/faac.h $(prefix)/include
- cp libfaac.so $(prefix)/lib
- cp libfaac.a $(prefix)/lib
-
-uninstall:
- rm -f $(prefix)/include/faac.h
- rm -f $(prefix)/lib/libfaac.so
- rm -f $(prefix)/lib/libfaac.a
-
-clean:
- rm -f $(OBJ)
- rm -f libfaac.a libfaac.so
--- /dev/null
+++ b/libfaac/Makefile.am
@@ -1,0 +1,9 @@
+lib_LTLIBRARIES = libfaac.la
+
+libfaac_la_SOURCES = aacquant.c bitstream.c fft.c frame.c joint.c psych.c util.c backpred.c channels.c filtbank.c huffman.c ltp.c tns.c
+libfaac_la_INCLUDES = aacquant.h channels.h filtbank.h hufftab.h psych.h backpred.h coder.h frame.h joint.h tns.h bitstream.h fft.h huffman.h ltp.h util.h
+
+CFLAGS = -O2
+INCLUDES = -I$(top_srcdir)/include
+
+