Makefile 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. ##
  2. # Copyright (C) 2021 Alibaba Group Holding Limited
  3. #
  4. # This program is free software; you can redistribute it and/or modify
  5. # it under the terms of the GNU General Public License version 2 as
  6. # published by the Free Software Foundation.
  7. ##
  8. # INCLUDES = -I../../driver/isp -I../../common
  9. TARGET = libxrp_linux.a
  10. CFLAGS = -O0 -Wall -g -lm -lpthread
  11. CFLAGS += -fPIC
  12. # USE_THREADS =
  13. # ifdef USE_THREADS
  14. queue_sources = xrp_threaded_queue.c
  15. INCLUDE +=-Ithread-pthread
  16. # else
  17. # queue_sources = xrp_sync_queue.c
  18. # endif
  19. xrp_SRCS += $(queue_sources)
  20. xrp_SRCS += xrp_host_common.c
  21. xrp_SRCS += hosted/xrp_linux.c
  22. xrp_SRCS += xrp_report.c
  23. INCLUDES = -I$(CURDIR) -Ihosted -I../include -Ithread-pthread -I../xrp-common -I../../xrp-kernel
  24. # object files will be generated from .c sourcefiles
  25. xrp_OBJS = $(notdir $(xrp_SRCS:.c=.o))
  26. all: $(TARGET)
  27. $(xrp_OBJS): $(xrp_SRCS)
  28. $(CC) -c $(CFLAGS) $(INCLUDES) $(xrp_SRCS)
  29. $(TARGET): $(xrp_OBJS)
  30. $(AR) -rc $(TARGET) $(xrp_OBJS)
  31. clean:
  32. rm -f *.o *.a
  33. rm -rf output
  34. install:
  35. .PHONY: clean all prepare common