diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..19b5242 --- /dev/null +++ b/Makefile @@ -0,0 +1,28 @@ + +SRCDIR := . +OBJS := real.o cpx.o ringbuf.o equalizer.o interpolation.o agc.o nco.o statistics.o symbol.o synchronization.o Frame.o + +LIB := $(BUILD_DIR)/libradio.a + +INCLUDES := . .. +DEFINES := radio_float_t=float fir_float_t=float + +CCFLAGS := -g -O2 $(addprefix -D, $(DEFINES)) $(addprefix -I, $(INCLUDES)) +CXXFLAGS := -g -O2 $(addprefix -D, $(DEFINES)) $(addprefix -I, $(INCLUDES)) -std=c++11 + +all : $(LIB) + +$(LIB) : $(OBJS) + $(AR) -r $(LIB) $(OBJS) + +%.o : $(addprefix $(SRCDIR)/, %.c) + $(CC) $(CCFLAGS) -c $< + +%.o : $(addprefix $(SRCDIR)/, %.cpp) + $(CXX) $(CXXFLAGS) -c $< + +clean: + rm -f *.o + +.PHONY: clean +