Makefile 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. # NOTE: GNU Make 3.81 won't export MAKEFLAGS if .POSIX is specified, but
  2. # Solaris make won't export MAKEFLAGS unless .POSIX is specified.
  3. $(firstword ignore).POSIX:
  4. .DEFAULT_GOAL = all
  5. .SUFFIXES:
  6. all:
  7. #
  8. # USER-MODIFIABLE MACROS
  9. #
  10. top_srcdir = .
  11. top_builddir = .
  12. CFLAGS = -O2 -march=native -g -Wall -Wextra -Wno-unused-parameter -Wno-unused-function
  13. SOFLAGS = $$(auto_soflags)
  14. LIBS = $$(auto_libs)
  15. ALL_CPPFLAGS = -I$(top_srcdir) -DWHEEL_BIT=$(WHEEL_BIT) -DWHEEL_NUM=$(WHEEL_NUM) $(CPPFLAGS)
  16. ALL_CFLAGS = $(CFLAGS)
  17. ALL_SOFLAGS = $(SOFLAGS)
  18. ALL_LDFLAGS = $(LDFLAGS)
  19. ALL_LIBS = $(LIBS)
  20. LUA_API = 5.3
  21. LUA = lua
  22. LUA51_CPPFLAGS = $(LUA_CPPFLAGS)
  23. LUA52_CPPFLAGS = $(LUA_CPPFLAGS)
  24. LUA53_CPPFLAGS = $(LUA_CPPFLAGS)
  25. WHEEL_BIT = 6
  26. WHEEL_NUM = 4
  27. RM = rm -f
  28. # END MACROS
  29. SHRC = \
  30. top_srcdir="$(top_srcdir)"; \
  31. top_builddir="$(top_builddir)"; \
  32. . "$${top_srcdir}/Rules.shrc"
  33. LUA_APIS = 5.1 5.2 5.3
  34. include $(top_srcdir)/lua/Rules.mk
  35. include $(top_srcdir)/bench/Rules.mk
  36. all: test-timeout
  37. timeout.o: $(top_srcdir)/timeout.c
  38. test-timeout.o: $(top_srcdir)/test-timeout.c
  39. timeout.o test-timeout.o:
  40. @$(SHRC); echo_cmd $(CC) $(ALL_CFLAGS) -c -o $@ $${top_srcdir}/$(@F:%.o=%.c) $(ALL_CPPFLAGS)
  41. test-timeout: timeout.o test-timeout.o
  42. @$(SHRC); echo_cmd $(CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS) -o $@ timeout.o test-timeout.o
  43. .PHONY: clean clean~
  44. clean:
  45. $(RM) $(top_builddir)/test-timeout $(top_builddir)/*.o
  46. $(RM) -r $(top_builddir)/*.dSYM
  47. clean~:
  48. find $(top_builddir) $(top_srcdir) -name "*~" -exec $(RM) -- {} "+"