forked from wahern/timeout
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
68 lines (48 loc) · 1.48 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# NOTE: GNU Make 3.81 won't export MAKEFLAGS if .POSIX is specified, but
# Solaris make won't export MAKEFLAGS unless .POSIX is specified.
$(firstword ignore).POSIX:
.DEFAULT_GOAL = all
.SUFFIXES:
all:
#
# USER-MODIFIABLE MACROS
#
top_srcdir = .
top_builddir = .
CFLAGS = -O2 -march=native -g -Wall -Wextra -Wno-unused-parameter -Wno-unused-function
SOFLAGS = $$(auto_soflags)
LIBS = $$(auto_libs)
ALL_CPPFLAGS = -I$(top_srcdir) -DWHEEL_BIT=$(WHEEL_BIT) -DWHEEL_NUM=$(WHEEL_NUM) $(CPPFLAGS)
ALL_CFLAGS = $(CFLAGS)
ALL_SOFLAGS = $(SOFLAGS)
ALL_LDFLAGS = $(LDFLAGS)
ALL_LIBS = $(LIBS)
LUA_API = 5.3
LUA = lua
LUA51_CPPFLAGS = $(LUA_CPPFLAGS)
LUA52_CPPFLAGS = $(LUA_CPPFLAGS)
LUA53_CPPFLAGS = $(LUA_CPPFLAGS)
WHEEL_BIT = 6
WHEEL_NUM = 4
RM = rm -f
# END MACROS
SHRC = \
top_srcdir="$(top_srcdir)"; \
top_builddir="$(top_builddir)"; \
. "$${top_srcdir}/Rules.shrc"
LUA_APIS = 5.1 5.2 5.3
include $(top_srcdir)/lua/Rules.mk
include $(top_srcdir)/bench/Rules.mk
all: test-timeout
timeout.o: $(top_srcdir)/timeout.c
test-timeout.o: $(top_srcdir)/test-timeout.c
timeout.o test-timeout.o:
@$(SHRC); echo_cmd $(CC) $(ALL_CFLAGS) -c -o $@ $${top_srcdir}/$(@F:%.o=%.c) $(ALL_CPPFLAGS)
test-timeout: timeout.o test-timeout.o
@$(SHRC); echo_cmd $(CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS) -o $@ timeout.o test-timeout.o
.PHONY: clean clean~
clean:
$(RM) $(top_builddir)/test-timeout $(top_builddir)/*.o
$(RM) -r $(top_builddir)/*.dSYM
clean~:
find $(top_builddir) $(top_srcdir) -name "*~" -exec $(RM) -- {} "+"