Makefile 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. CFLAGS = -std=gnu11 -Wall ## -Werror
  2. CFLAGS += -I/opt/redpitaya/include
  3. LDFLAGS = -L/opt/redpitaya/lib
  4. LDLIBS = -static -lrp-hw-can -lrp -lrp-hw-calib -lrp-hw-profiles
  5. INCLUDE += -I/opt/redpitaya/include/api250-12
  6. LDLIBS += -lrp-gpio -lrp-i2c
  7. LDLIBS += -lrp-hw -lm -lstdc++ -lpthread -li2c -lsocketcan
  8. # List of compiled object files (not yet linked to executable)
  9. PRGS = analog_inputs \
  10. analog_outputs \
  11. digital_led_bar \
  12. digital_led_blink \
  13. digital_push_button \
  14. i2c \
  15. spi \
  16. spi_loopback \
  17. test_e_module \
  18. uart \
  19. uart_loopback \
  20. can_pass \
  21. can_loopback \
  22. calibration_api \
  23. axi_gen
  24. PRGS += acquire_trigger_software \
  25. acquire_trigger_posedge \
  26. acquire_signal_check \
  27. generate_arbitrary_waveform \
  28. generate_burst_trigger_external \
  29. generate_burst_trigger_software \
  30. generate_continuous \
  31. generate_two_burst_trigger_software \
  32. generate_two_trigger_software_sync \
  33. axi \
  34. axi_4ch
  35. PRGS += i2c_eeprom_read_calib
  36. PRGS += acquire_4ch_trigger_software
  37. PRGS += i2c_switch_max7311
  38. OBJS := $(patsubst %,%.o,$(PRGS))
  39. SRC := $(patsubst %,%.c,$(PRGS))
  40. all: $(PRGS)
  41. $(PRGS): %: %.c
  42. $(CC) $< $(CFLAGS) $(LDFLAGS) $(LDLIBS) -o $@
  43. clean:
  44. $(RM) *.o
  45. $(RM) $(OBJS)
  46. clean_all: clean
  47. $(RM) $(PRGS)