Added the makefiles for linux...
This commit is contained in:
parent
4cba44dd46
commit
ce77c9f932
|
@ -0,0 +1,8 @@
|
|||
CC=g++
|
||||
CFLAGS=-Wall
|
||||
LDFLAGS=-L../../Source -lcAudio
|
||||
|
||||
OBJECT=main.o
|
||||
|
||||
all: $(OBJECT)
|
||||
$(CC) $(OBJECT) -o ../../bin/linux-x86/Tutorial1_2DSound $(LDFLAGS)
|
|
@ -0,0 +1,8 @@
|
|||
CC=g++
|
||||
CFLAGS=-Wall
|
||||
LDFLAGS=-L../../Source -lcAudio
|
||||
|
||||
OBJECT=main.o
|
||||
|
||||
all: $(OBJECT)
|
||||
$(CC) $(OBJECT) -o ../../bin/linux-x86/Tutorial2_3DSound $(LDFLAGS)
|
|
@ -0,0 +1,8 @@
|
|||
CC=g++
|
||||
CFLAGS=-Wall
|
||||
LDFLAGS=-L../../Source -lcAudio
|
||||
|
||||
OBJECT=main.o
|
||||
|
||||
all: $(OBJECT)
|
||||
$(CC) $(OBJECT) -o ../../bin/linux-x86/Tutorial3_MemoryPlayback $(LDFLAGS)
|
|
@ -0,0 +1,8 @@
|
|||
CC=g++
|
||||
CFLAGS=-Wall
|
||||
LDFLAGS=-L../../Source -lcAudio
|
||||
|
||||
OBJECT=main.o
|
||||
|
||||
all: $(OBJECT)
|
||||
$(CC) $(OBJECT) -o ../../bin/linux-x86/Tutorial4_AudioCapture $(LDFLAGS)
|
|
@ -0,0 +1,8 @@
|
|||
CC=g++
|
||||
CFLAGS=-Wall
|
||||
LDFLAGS=-L../../Source -lcAudio
|
||||
|
||||
OBJECT=main.o
|
||||
|
||||
all: $(OBJECT)
|
||||
$(CC) $(OBJECT) -o ../../bin/linux-x86/Tutorial5_AudioEffects $(LDFLAGS)
|
|
@ -0,0 +1,8 @@
|
|||
CC=g++
|
||||
CFLAGS=-Wall
|
||||
LDFLAGS=-L../../Source -lcAudio
|
||||
|
||||
OBJECT=main.o cTestHandler.o
|
||||
|
||||
all: $(OBJECT)
|
||||
$(CC) $(OBJECT) -o ../../bin/linux-x86/Tutorial6_CustomEventHandler $(LDFLAGS)
|
|
@ -0,0 +1,8 @@
|
|||
CC=g++
|
||||
CFLAGS=-Wall
|
||||
LDFLAGS=-L../../Source -lcAudio
|
||||
|
||||
OBJECT=main.o cTestLogReceiver.o
|
||||
|
||||
all: $(OBJECT)
|
||||
$(CC) $(OBJECT) -o ../../bin/linux-x86/Tutorial7_CustomLogReceiver $(LDFLAGS)
|
|
@ -1,22 +1,22 @@
|
|||
#!/bin/bash
|
||||
cd Tutorial1_2DSound
|
||||
g++ main.cpp -o ../../bin/linux-x86/Tutorial1_2DSound -lcAudio
|
||||
make
|
||||
cd ../
|
||||
cd Tutorial2_3DSound
|
||||
g++ main.cpp -o ../../bin/linux-x86/Tutorial2_3DSound -lcAudio
|
||||
cd Tutorial2_3DSound;
|
||||
make
|
||||
cd ../
|
||||
cd Tutorial3_MemoryPlayback
|
||||
g++ main.cpp -o ../../bin/linux-x86/Tutorial3_MemoryPlayback -lcAudio
|
||||
cd Tutorial3_MemoryPlayback;
|
||||
make
|
||||
cd ../
|
||||
cd Tutorial4_AudioCapture
|
||||
g++ main.cpp -o ../../bin/linux-x86/Tutorial4_AudioCapture -lcAudio
|
||||
cd Tutorial4_AudioCapture;
|
||||
make
|
||||
cd ../
|
||||
cd Tutorial5_AudioEffects
|
||||
g++ main.cpp -o ../../bin/linux-x86/Tutorial5_AudioEffects -lcAudio
|
||||
cd Tutorial5_AudioEffects;
|
||||
make
|
||||
cd ../
|
||||
cd Tutorial6_CustomEventHandler
|
||||
g++ main.cpp cTestHandler.cpp -o ../../bin/linux-x86/Tutorial6_CustomEventHandler -lcAudio
|
||||
cd Tutorial6_CustomEventHandler;
|
||||
make
|
||||
cd ../
|
||||
cd Tutorial7_CustomLogReceiver
|
||||
g++ main.cpp cTestLogReceiver.cpp -o ../../bin/linux-x86/Tutorial7_CustomLogReceiver -lcAudio
|
||||
cd ../
|
||||
make
|
||||
cd ../
|
||||
|
|
|
@ -1,29 +1,66 @@
|
|||
SONAME=libcAudio.so
|
||||
VERSION=2.0
|
||||
DIR=../bin/Linux/x86 #x86_64
|
||||
VERSION=2.0.0
|
||||
SONAME=libcAudio.$(VERSION).so
|
||||
DIR=../bin/Linux/x86 #x86_64/home/wildicv/Documents/cAudio/Trunk/Source
|
||||
|
||||
DEPEND=-logg -lopenal -lvorbis -lvorbisenc -lvorbisfile\
|
||||
-I../dependencies/Headers
|
||||
|
||||
OBJECT= cAudioCapture.o cAudioEffects.o cAudioManager.o cAudioSleep.o cAudioSource.o cConsoleLogReceiver.o cEffect.o cFileSource.o cFilter.o cFileLogReceiver.o cListener.o cLogger.o cMemorySource.o cMutex.o cOggAudioDecoderFactory.o cOggDecoder.o cPluginManager.o cRawDecoder.o cThread.o cWavAudioDecoderFactory.o cWavDecoder.o
|
||||
|
||||
LINK_OPTIONS=-shared
|
||||
LINK_OPTIONS=-shared
|
||||
COMPILE_OPTIONS=-fPIC
|
||||
|
||||
CC=g++
|
||||
|
||||
all: shared static
|
||||
|
||||
|
||||
shared: $(OBJECT)
|
||||
$(CC) -o $(SONAME) $(OBJECT) $(LINK_OPTIONS) $(DEPEND)
|
||||
$(CC) -o $(SONAME) $(OBJECT) $(LINK_OPTIONS) $(DEPEND)
|
||||
ln -s libcAudio.2.0.0.so libcAudio.so
|
||||
|
||||
static: $(OBJECT)
|
||||
ar cr libcAudio.$(VERSION).a *.o
|
||||
ranlib libcAudio.$(VERSION).a
|
||||
ln -s libcAudio.2.0.0.a libcAudio.a
|
||||
install: $(OBJECT)
|
||||
if test -d /usr/local/lib/cAudio2.0.0; \
|
||||
then sudo cp libcAudio.$(VERSION).a /usr/lib/cAudio2.0.0; \
|
||||
else mkdir /usr/local/lib/cAudio2.0.0; \
|
||||
sudo cp libcAudio.$(VERSION).a /us/home/wildicv/Documents/cAudio/Trunk/Sourcer/local/lib/cAudio2.0.0;\
|
||||
fi
|
||||
|
||||
if test -d /usr/local/include/cAudio2.0.0; \
|
||||
then sudo cp -r ../include/* /usr/local/include/cAudio2.0.0; \
|
||||
else mkdir /usr/local/include/cAudio2.0.0; \
|
||||
sudo cp -r ../include/* /usr/local/include/cAudio2.0.0;\
|
||||
fi
|
||||
sudo rm /usr/local/lib/libcAudio.a
|
||||
sudo ln -s /usr/local/lib/cAudio2.0.0/libcAudio.2.0.0.a /usr/local/lib/libcAudio.a
|
||||
ldconfig
|
||||
|
||||
installShared: $(OBJECT)
|
||||
if test -d /usr/local/lib/cAudio2.0.0; \
|
||||
then sudo cp libcAudio.$(VERSION).so /usr/local/lib/cAudio2.0.0; \
|
||||
else mkdir /usr/local/lib/cAudio2.0.0; \
|
||||
sudo cp libcAudio.$(VERSION).so /usr/local/lib/cAudio2.0.0;\
|
||||
fi
|
||||
|
||||
if test -d /usr/local/include/cAudio2.0.0; \
|
||||
then sudo cp -r ../include/* /usr/local/include/cAudio2.0.0; \
|
||||
else mkdir /usr/local/include/cAudio2.0.0; \
|
||||
sudo cp -r ../include/* /usr/local/include/cAudio2.0.0;\
|
||||
fi
|
||||
sudo rm /usr/local/lib/libcAudio.so
|
||||
sudo ln -s /usr/local/lib/cAudio2.0.0/libcAudio.2.0.0.so /usr/local/lib/libcAudio.so
|
||||
ldconfig
|
||||
|
||||
buildExamples: $(OBJECT)
|
||||
cd ../Examples;\
|
||||
./buildAll.sh
|
||||
|
||||
clean:
|
||||
cd ../Examples
|
||||
rm -f *.o *.so lib*.so libcAudio.$(VERSION).a *~
|
||||
|
||||
|
||||
%.o: %.cpp
|
||||
$(CC) -c -o $@ $< $(COMPILE_OPTIONS)
|
||||
|
||||
|
|
Loading…
Reference in New Issue