1 2 3# Sfront, a SAOL to C translator 4# This file: Makefile for an sfront example 5# 6# Copyright (c) 2000-2006, Regents of the University of California 7# All rights reserved. 8# 9# Redistribution and use in source and binary forms, with or without 10# modification, are permitted provided that the following conditions are 11# met: 12# 13# Redistributions of source code must retain the above copyright 14# notice, this list of conditions and the following disclaimer. 15# 16# Redistributions in binary form must reproduce the above copyright 17# notice, this list of conditions and the following disclaimer in the 18# documentation and/or other materials provided with the distribution. 19# 20# Neither the name of the University of California, Berkeley nor the 21# names of its contributors may be used to endorse or promote products 22# derived from this software without specific prior written permission. 23# 24# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 25# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 26# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 27# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 28# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 29# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 30# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 31# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 32# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 33# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 34# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 35# 36# Maintainer: John Lazzaro, lazzaro@cs.berkeley.edu 37 38 39FILENAME = ascii 40 41SAOLFILE = $(FILENAME).saol 42SASLFILE = $(FILENAME).sasl 43 44## 45## This Makefile set up for Mac OS X (CoreAudio). Thanks to Richard Dobson 46## 47 48OUTFILE = coreaudio 49 50##CC = cc 51##OPT = -O3 52##CFLAGS = $(OPT) 53 54CC = gcc 55OPT = -O3 56MODEL = -m32 57DEPRE = -Wno-deprecated-declarations 58CFLAGS = $(MODEL) $(DEPRE) $(OPT) 59 60SFRONT = sfront 61 62OUTMODE = -aout $(OUTFILE) 63INMODE = 64CNMODE = -cin ascii 65IOLINK = -framework coreaudio 66 67 68## 69## makes a raw 16-bit signed integer audio file 70## 71 72$(OUTFILE): $(SAOLFILE) 73 $(SFRONT) $(OUTMODE) $(CNMODE) -orc $(SAOLFILE) -sco $(SASLFILE) 74 $(CC) $(CFLAGS) sa.c -lm $(IOLINK) -o sa 75 ./sa 76 77clean: 78 rm -rf sa.c sa audio a*.wav $(MP4FILE) $(OUTFILE) *.info *~ safe 79 80 81 82