mediaextract/Makefile

59 lines
1.3 KiB
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-29 00:07:41 +00:00
OBJ=\
$(BUILDDIR)/audioextract.o \
$(BUILDDIR)/wave.o \
$(BUILDDIR)/ogg.o \
$(BUILDDIR)/mpeg.o \
$(BUILDDIR)/id3.o \
$(BUILDDIR)/midi.o \
2012-12-29 04:20:01 +00:00
$(BUILDDIR)/mod.o \
2012-12-29 05:31:30 +00:00
$(BUILDDIR)/s3m.o \
$(BUILDDIR)/it.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-29 05:31:30 +00:00
$(BUILDDIR)/audioextract.o: audioextract.c audioextract.h ogg.h wave.h mpeg.h id3.h midi.h mod.h s3m.h it.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 17:23:27 +00:00
$(BUILDDIR)/midi.o: midi.c audioextract.h midi.h
$(CC) $(CFLAGS) $< -o $@ -c
2012-12-29 00:07:41 +00:00
$(BUILDDIR)/mod.o: mod.c audioextract.h mod.h
$(CC) $(CFLAGS) $< -o $@ -c
2012-12-29 04:20:01 +00:00
$(BUILDDIR)/s3m.o: s3m.c audioextract.h s3m.h
$(CC) $(CFLAGS) $< -o $@ -c
2012-12-29 05:31:30 +00:00
$(BUILDDIR)/it.o: it.c audioextract.h it.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)