Makefile 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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 = libdsp.so
  10. CFLAGS = -O2 -Wall -g -lm -lpthread
  11. CFLAGS:=-fPIC
  12. LDFLAGS:=-shared -fpic
  13. LDFLAGS+=--whole-archive
  14. LDFLAGS += -Lxrp-host -lxrp_linux
  15. LDFLAGS += -Lxrp-common -lxrp-common
  16. LDFLAGS+=--no-whole-archive
  17. # LDFLAGS += -Lxrp-host -lxrp_linux
  18. # LDFLAGS += -Lxrp-common -lxrp-common
  19. # LIB_PATH += -Lxrp-host
  20. # LIB_PATH += -Lxrp-common
  21. # LIBS += -lpthread
  22. # LIBS += -lxrp_linux
  23. # LIBS += -lxrp-common
  24. # USE_THREADS =
  25. xrp_SRCS += dsp-ps/csi_dsp_core.c
  26. # xrp_SRCS += dsp-ps/dsp_ps_core.c
  27. xrp_SRCS += dsp-ps/csi_dsp_helper.c
  28. xrp_SRCS += dsp-ps/dsp_common.c
  29. INCLUDES = -I$(CURDIR) -Ihosted -Iinclude -Ithread-pthread -I../xrp-common -I../../xrp-kernel
  30. # object files will be generated from .c sourcefiles
  31. xrp_OBJS = $(notdir $(xrp_SRCS:.c=.o))
  32. all: $(TARGET)
  33. XRP_COMMON := xrp-common
  34. $(XRP_COMMON): DUMMY
  35. make -C $(XRP_COMMON)
  36. XRP_LINUX:=xrp-host
  37. $(XRP_LINUX): DUMMY
  38. make -C $(XRP_LINUX)
  39. DUMMY:
  40. $(xrp_OBJS): $(xrp_SRCS)
  41. $(CC) -c $(CFLAGS) $(INCLUDES) $(xrp_SRCS)
  42. $(TARGET): $(xrp_OBJS) $(XRP_COMMON) $(XRP_LINUX)
  43. $(LD) $(LDFLAGS) -o $(TARGET) $(xrp_OBJS) $(LIB_PATH) $(LIBS)
  44. clean:
  45. rm -f *.o
  46. rm -f *.so
  47. rm -rf output
  48. install:
  49. .PHONY: clean all prepare common