-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
52 lines (37 loc) · 1 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
#
# Copyright (C) 2012 NEC Corporation
#
TREMA = ../trema
GEM_BIN = `ruby -e 'require "rubygems"; puts Gem::bindir'`
SHELL = /bin/sh
CC = gcc
AR = ar
RANLIB = ranlib
CFLAGS = $(shell $(TREMA)/trema-config --cflags) -g -std=gnu99 -D_GNU_SOURCE -fno-strict-aliasing -Werror -Wall -Wextra -Wformat=2 -Wcast-qual -Wcast-align -Wwrite-strings -Wconversion -Wfloat-equal -Wpointer-arith
LDFLAGS = $(shell $(TREMA)/trema-config --libs)
TARGET = libpathresolver.a
SRCS = heap.c topology_cache.c heap_utility.c calc.c
OBJS = $(SRCS:.c=.o)
FEATURES = path_resolver.feature
DEPENDS = .depends
.PHONY: all clean
.SUFFIXES: .c .o
all: depend $(TARGET)
$(TARGET): $(OBJS)
$(AR) -cq $@ $(OBJS)
$(RANLIB) $@
.c.o:
$(CC) $(CFLAGS) -c $<
depend:
$(CC) -MM $(CFLAGS) $(SRCS) > $(DEPENDS)
clean:
@rm -rf $(DEPENDS) $(OBJS) $(TARGET) *~
run_acceptance_test:
@for feature in $(FEATURES); do \
( \
file=`pwd`/$$feature; \
cd ${TREMA}; \
${GEM_BIN}/cucumber -r features $$file; \
) \
done
-include $(DEPENDS)