mediaextract/Makefile

38 lines
886 B
Makefile
Raw Normal View History

2012-12-28 01:13:50 +00:00
PREFIX=/usr/local
2012-12-27 16:02:19 +00:00
BUILDDIR=build
2012-12-27 19:09:06 +00:00
OBJ=$(BUILDDIR)/audioextract.o $(BUILDDIR)/wave.o $(BUILDDIR)/ogg.o $(BUILDDIR)/mpeg.o $(BUILDDIR)/id3.o
2012-12-27 16:02:19 +00:00
CC=gcc
2012-12-28 00:53:06 +00:00
CFLAGS=-Wall -std=gnu99 -O2 -fmessage-length=0 -g
2012-12-27 16:02:19 +00:00
BIN=$(BUILDDIR)/audioextract
2012-12-28 01:13:50 +00:00
.PHONY: all clean install uninstall
2012-12-27 01:05:02 +00:00
2012-12-27 16:02:19 +00:00
all: $(BIN)
$(BIN): $(OBJ)
$(CC) $(CFLAGS) $(OBJ) -o $@
2012-12-27 19:09:06 +00:00
$(BUILDDIR)/audioextract.o: audioextract.c audioextract.h ogg.h wave.h mpeg.h id3.h
2012-12-27 16:02:19 +00:00
$(CC) $(CFLAGS) $< -o $@ -c
2012-12-27 17:17:49 +00:00
$(BUILDDIR)/wave.o: wave.c audioextract.h wave.h
2012-12-27 16:02:19 +00:00
$(CC) $(CFLAGS) $< -o $@ -c
2012-12-27 17:17:49 +00:00
$(BUILDDIR)/ogg.o: ogg.c audioextract.h ogg.h
2012-12-27 16:02:19 +00:00
$(CC) $(CFLAGS) $< -o $@ -c
2012-12-27 01:05:02 +00:00
2012-12-27 17:17:49 +00:00
$(BUILDDIR)/mpeg.o: mpeg.c audioextract.h mpeg.h
$(CC) $(CFLAGS) $< -o $@ -c
2012-12-27 01:05:02 +00:00
2012-12-27 19:09:06 +00:00
$(BUILDDIR)/id3.o: id3.c audioextract.h id3.h
$(CC) $(CFLAGS) $< -o $@ -c
2012-12-28 01:13:50 +00:00
install: all
install -s -D $(BIN) "$(PREFIX)/bin/audioextract"
uninstall:
rm -f "$(PREFIX)/bin/audioextract"
2012-12-27 01:05:02 +00:00
clean:
2012-12-28 01:13:50 +00:00
rm -f $(BIN) $(OBJ)