ref: 39ceeea51bf321899c5d82f27b7c5ce8e4e35a0e
parent: c2ba7904a7195e871da8faf69a054b731f539997
author: oxygene <oxygene>
date: Thu Mar 1 08:08:44 EST 2001
Install and uninstall target added. Small change
--- a/Makefile
+++ b/Makefile
@@ -2,6 +2,14 @@
make -C libfaac
make -C frontend
+install:
+ make -C libfaac $@
+ make -C frontend $@
+
+uninstall:
+ make -C libfaac $@
+ make -C frontend $@
+
clean:
- make -C libfaac clean
- make -C frontend clean
+ make -C libfaac $@
+ make -C frontend $@
--- a/frontend/Makefile
+++ b/frontend/Makefile
@@ -1,12 +1,16 @@
-prefix=/usr/local/bin
-CFLAGS=-I../include
+prefix = /usr/local
-faac: main.o
- gcc main.o -o faac -L../libfaac -lfaac -lsndfile
+CFLAGS := -L../libfaad -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 faac *.o
+ rm -f faac *.o
--- a/libfaac/Makefile
+++ b/libfaac/Makefile
@@ -1,6 +1,7 @@
-prefix=/usr/local/lib
+prefix = /usr/local
-CFLAGS=-ansi -pedantic
+#CFLAGS := -ansi -pedantic $(CFLAGS)
+CFLAGS := -DHAS_ULONG $(CFLAGS)
SRC= \
aacquant.c\
@@ -14,7 +15,7 @@
psych.c\
util.c
-OBJ := $(SRC:.c=.o)
+OBJ = $(SRC:.c=.o)
all: libfaac.a libfaac.so
@@ -28,9 +29,14 @@
install: libfaac.so libfaac.a
mkdir -p $(prefix)/include
mkdir -p $(prefix)/lib
- cp ../include/faac.h $(prefix)/include/faac.h
- cp libfaac.so $(prefix)/lib/libfaac.so
- cp libfaac.a $(prefix)/lib/libfaac.a
+ 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)