Makefile 748 B

123456789101112131415161718192021222324252627282930313233343536373839
  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. TARGET = libxrp-common.a
  9. CFLAGS = -O0 -Wall -g -lm
  10. CFLAGS += -fPIC
  11. xrp_SRCS += xrp_rb_file.c
  12. xrp_SRCS += xrp_ns.c
  13. INCLUDES = -I$(CURDIR) -I../include -I../../xrp-kernel
  14. # object files will be generated from .c sourcefiles
  15. xrp_OBJS = $(notdir $(xrp_SRCS:.c=.o))
  16. all: $(TARGET)
  17. $(xrp_OBJS): $(xrp_SRCS)
  18. $(CC) -c $(CFLAGS) $(INCLUDES) $(xrp_SRCS)
  19. $(TARGET): $(xrp_OBJS)
  20. $(AR) -rc $(TARGET) $(xrp_OBJS)
  21. clean:
  22. rm -f *.o *.a
  23. rm -rf output
  24. install:
  25. .PHONY: clean all prepare common