[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Make not just for compilation
From: |
Thomas Cort |
Subject: |
Make not just for compilation |
Date: |
Thu, 1 Apr 2004 06:31:29 -0500 |
User-agent: |
Mutt/1.5.6i |
Hi,
I just wanted to let you all know that GNU Make is one of my favorite
programs, and you all are awesome for producing such a high quality piece
of Free Software. However, not too many people are aware that you can use
make in a non-programming context. Below is an Makefile for audio
re-encoding. It decodes and encodes all files of a given suffix in the
current directory. Feel free to use it on websites, in books, anywhere.
-Tom
PS: Plz cc any replies as I am not subscribed to this list.
# 1337 Audio Re-encoder Makefile
# Copyright (C) 2004 Thomas Cort
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
DECODER = shorten
DFLAGS = -x
DSUF = .shn
FILES = $(wildcard *$(DSUF))
ENCODER = flac
EFLAGS = -8
ESUF = .flac
RSUF = .wav
all: decode encode
echo "done"
decode: $(FILES:$(DSUF)=$(RSUF))
encode: $(FILES:$(DSUF)=$(ESUF))
.SUFFIXES: $(RSUF) $(ESUF)
$(RSUF)$(ESUF):
$(ENCODER) $(EFLAGS) $<
rm -f $<
.SUFFIXES: $(DSUF) $(RSUF)
$(DSUF)$(RSUF):
$(DECODER) $(DFLAGS) $<
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Make not just for compilation,
Thomas Cort <=