Compile in native by default, since AVX helps so much.
[c64tapwav] / Makefile
1 CXXFLAGS=--std=gnu++0x -O2 -fno-math-errno -march=native -g -Wall
2 LDLIBS=-lavcodec -lavformat -lavutil -lswresample
3
4 all: synth decode sync cleaner
5
6 %.o: %.cpp
7         $(CXX) -MMD -MP $(CPPFLAGS) $(CXXFLAGS) -o $@ -c $<
8
9 OBJS=decode.o synth.o synth_main.o interpolate.o sync.o level.o filter.o
10
11 DEPS=$(OBJS:.o=.d)
12 -include $(DEPS)
13
14 decode: interpolate.o audioreader.o decode.o level.o filter.o
15         $(CXX) -o $@ $^ $(LDLIBS) $(LDFLAGS)
16
17 synth: synth.o synth_main.o
18         $(CXX) -o $@ $^ $(LDFLAGS)
19
20 sync: interpolate.o sync.o
21         $(CXX) -o $@ $^ $(LDFLAGS)
22
23 cleaner: cleaner.o
24         $(CXX) -o $@ $^ $(LDFLAGS)
25
26 clean:
27         $(RM) synth decode sync cleaner $(OBJS) $(DEPS)