Makefile (1517B)
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 5 .DEFAULT_GOAL = all 6 7 .SUFFIXES: 8 9 all: 10 11 # 12 # USER-MODIFIABLE MACROS 13 # 14 top_srcdir = . 15 top_builddir = . 16 17 CFLAGS = -O2 -march=native -g -Wall -Wextra -Wno-unused-parameter -Wno-unused-function 18 SOFLAGS = $$(auto_soflags) 19 LIBS = $$(auto_libs) 20 21 ALL_CPPFLAGS = -I$(top_srcdir) -DWHEEL_BIT=$(WHEEL_BIT) -DWHEEL_NUM=$(WHEEL_NUM) $(CPPFLAGS) 22 ALL_CFLAGS = $(CFLAGS) 23 ALL_SOFLAGS = $(SOFLAGS) 24 ALL_LDFLAGS = $(LDFLAGS) 25 ALL_LIBS = $(LIBS) 26 27 LUA_API = 5.3 28 LUA = lua 29 LUA51_CPPFLAGS = $(LUA_CPPFLAGS) 30 LUA52_CPPFLAGS = $(LUA_CPPFLAGS) 31 LUA53_CPPFLAGS = $(LUA_CPPFLAGS) 32 33 WHEEL_BIT = 6 34 WHEEL_NUM = 4 35 36 RM = rm -f 37 38 # END MACROS 39 40 SHRC = \ 41 top_srcdir="$(top_srcdir)"; \ 42 top_builddir="$(top_builddir)"; \ 43 . "$${top_srcdir}/Rules.shrc" 44 45 LUA_APIS = 5.1 5.2 5.3 46 47 include $(top_srcdir)/lua/Rules.mk 48 include $(top_srcdir)/bench/Rules.mk 49 50 all: test-timeout 51 52 timeout.o: $(top_srcdir)/timeout.c 53 test-timeout.o: $(top_srcdir)/test-timeout.c 54 55 timeout.o test-timeout.o: 56 @$(SHRC); echo_cmd $(CC) $(ALL_CFLAGS) -c -o $@ $${top_srcdir}/$(@F:%.o=%.c) $(ALL_CPPFLAGS) 57 58 test-timeout: timeout.o test-timeout.o 59 @$(SHRC); echo_cmd $(CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS) -o $@ timeout.o test-timeout.o 60 61 .PHONY: clean clean~ 62 63 clean: 64 $(RM) $(top_builddir)/test-timeout $(top_builddir)/*.o 65 $(RM) -r $(top_builddir)/*.dSYM 66 67 clean~: 68 find $(top_builddir) $(top_srcdir) -name "*~" -exec $(RM) -- {} "+"