]> git.sesse.net Git - c64tapwav/blobdiff - Makefile
Use ffmpeg to read audio files, instead of assuming raw format.
[c64tapwav] / Makefile
index ae22aa885a5ef4b75b065ec542dcc4f1d34309e9..91e6354cfd47e36332ded58869dfb12f082733a6 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,17 +1,18 @@
-CXXFLAGS=-O2 -ffast-math -g -Wall
+CXXFLAGS=--std=gnu++0x -O2 -ffast-math -g -Wall
+LDLIBS=-lavcodec -lavformat -lavutil -lswresample
 
-all: synth decode sync
+all: synth decode sync level cleaner
 
 %.o: %.cpp
        $(CXX) -MMD -MP $(CPPFLAGS) $(CXXFLAGS) -o $@ -c $<
 
-OBJS=decode.o synth.o synth_main.o interpolate.o sync.o
+OBJS=decode.o synth.o synth_main.o interpolate.o sync.o level.o
 
 DEPS=$(OBJS:.o=.d)
 -include $(DEPS)
 
-decode: interpolate.o decode.o
-       $(CXX) -o $@ $^ $(LDFLAGS)
+decode: interpolate.o audioreader.o decode.o
+       $(CXX) -o $@ $^ $(LDLIBS) $(LDFLAGS)
 
 synth: synth.o synth_main.o
        $(CXX) -o $@ $^ $(LDFLAGS)
@@ -19,5 +20,11 @@ synth: synth.o synth_main.o
 sync: interpolate.o sync.o
        $(CXX) -o $@ $^ $(LDFLAGS)
 
+level: level.o
+       $(CXX) -o $@ $^ $(LDFLAGS)
+
+cleaner: cleaner.o
+       $(CXX) -o $@ $^ $(LDFLAGS)
+
 clean:
-       $(RM) synth decode sync $(OBJS) $(DEPS)
+       $(RM) synth decode sync level cleaner $(OBJS) $(DEPS)