Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
CXXFLAGS = -std=c++14 -I.
CXXFLAGS = -std=c++14 -I. -fPIC
LDFLAGS = -lm

TARGETS = gen_ft8 decode_ft8 test
TARGETS = gen_ft8 decode_ft8 test libft8.so libft8.a

.PHONY: run_tests all clean

Expand All @@ -19,8 +19,15 @@ test: test.o ft8/pack.o ft8/encode.o ft8/text.o ft8/constants.o fft/kiss_fftr.o
decode_ft8: decode_ft8.o fft/kiss_fftr.o fft/kiss_fft.o ft8/decode.o ft8/encode.o ft8/ldpc.o ft8/unpack.o ft8/text.o ft8/constants.o common/wave.o
$(CXX) $(LDFLAGS) -o $@ $^

libft8.a: ft8/constants.o ft8/encode.o ft8/pack.o ft8/text.o common/wave.o
$(AR) rc libft8.a ft8/constants.o ft8/encode.o ft8/pack.o ft8/text.o common/wave.o

libft8.so: ft8/constants.o ft8/encode.o ft8/pack.o ft8/text.o common/wave.o
$(CXX) -shared -o $@ $^

clean:
rm -f *.o ft8/*.o common/*.o fft/*.o $(TARGETS)

install:
$(AR) rc libft8.a ft8/constants.o ft8/encode.o ft8/pack.o ft8/text.o common/wave.o
install libft8.a /usr/lib/libft8.a
install libft8.so /usr/lib/libft8.so