damaris-backends/drivers/Spectrum-MI40xxSeries/Makefile
Markus Rosenstihl 449ae0c9ef New backend (with M2I40xx ADC card)
* enabled fc1_backend with M2I40xx ADC card
* debian package now depends also on the spcm and libspcm-linux kernel
* module and library from Spectrum
2017-03-10 13:20:44 +01:00

44 lines
1.2 KiB
Makefile

CPPFLAGS=-Iinclude -I../..
CXXFLAGS=-Wshadow -Wall -pedantic -O0
AR=ar
SPC_HEADERS = include/spcerr.h include/regs.h include/dlltyp.h include/spcioctl.inc
#SPC_ZIP = ../Spectrum-M2i40xxSeries/drv_spcm_linux_drv_v214b5633.zip
SPC_ZIP = ../Spectrum-MI40xxSeries/drv_header_v402b6844.zip
all: clean $(SPC_HEADERS) patch Spectrum-MI40xxSeries.a hw_test_int hw_test_ext
$(SPC_HEADERS): $(SPC_ZIP)
unzip -u $< "*.h" "*.txt" "*.inc" -d include/
patch:
patch -N -p0 < ftbfs_patch.diff
Spectrum-MI40xxSeries.a: Spectrum-MI40xxSeries.o GatedData.o
$(AR) r $@ $^
Spectrum-MI40xxSeries.o: Spectrum-MI40xxSeries.cpp Spectrum-MI40xxSeries.h GatedData.h include/spcerr.h
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c -o $@ $<
GatedData.o: GatedData.cpp GatedData.h
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c -o $@ $<
test.o: test.cpp Spectrum-MI40xxSeries.h include/spcerr.h
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c -o $@ $<
test: test.o Spectrum-MI40xxSeries.o ../../core/core.a
$(CXX) -o $@ -I../.. ../ADC.h $^ -lpthread -lm
hw_test_int: hw_test_intclock.cpp
$(CXX) -o $@ -Iinclude $^
hw_test_ext: hw_test_extclock.cpp
$(CXX) -o $@ -Iinclude $^
../../core/core.a:
$(MAKE) -C ../../core core.a
clean:
rm -f *.o *.a *~ test *.core hw_test_ext hw_test_int
rm -rf include