Browse files

Modify Makefiles for trema installed as rubygems

  • Loading branch information...
1 parent 808f13e commit 2f4386377c4956b6016308ca853b862b8346ac6c @kazuyas kazuyas committed Jan 7, 2013
View
11 broadcast_helper/Makefile
@@ -1,13 +1,18 @@
#
-# Copyright (C) 2011 NEC Corporation
+# Copyright (C) 2011-2013 NEC Corporation
#
TREMA = ../../trema
SHELL = /bin/sh
+TREMA_CONFIG = $(shell which trema-config)
+ifeq ($(TREMA_CONFIG),)
+ TREMA_CONFIG = $(TREMA)/trema-config
+endif
+
CC = gcc
-CFLAGS = $(shell $(TREMA)/trema-config --cflags) -I../topology -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) -L../topology -ltopology
+CFLAGS = $(shell $(TREMA_CONFIG) --cflags) -I../topology -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_CONFIG) --libs) -L../topology -ltopology
TARGET = broadcast_helper
SRCS = port.c broadcast_helper.c
View
11 flow_dumper/Makefile
@@ -1,12 +1,17 @@
#
-# Copyright (C) 2011 NEC Corporation
+# Copyright (C) 2011-2013 NEC Corporation
#
TREMA = ../../trema
+TREMA_CONFIG = $(shell which trema-config)
+ifeq ($(TREMA_CONFIG),)
+ TREMA_CONFIG = $(TREMA)/trema-config
+endif
+
CC = gcc
-CFLAGS = $(shell $(TREMA)/trema-config --cflags) -std=gnu99 -D_GNU_SOURCE -g -Wall
-LDFLAGS = $(shell $(TREMA)/trema-config --libs)
+CFLAGS = $(shell $(TREMA_CONFIG) --cflags) -std=gnu99 -D_GNU_SOURCE -g -Wall
+LDFLAGS = $(shell $(TREMA_CONFIG) --libs)
TARGET = flow_dumper
SRCS = flow_dumper.c
View
11 flow_manager/Makefile
@@ -1,5 +1,5 @@
#
-# Copyright (C) 2011 NEC Corporation
+# Copyright (C) 2011-2013 NEC Corporation
#
TREMA = ../../trema
@@ -8,8 +8,13 @@ CC = gcc
AR = ar
RANLIB = ranlib
-CFLAGS = $(shell $(TREMA)/trema-config --cflags) -std=gnu99 -D_GNU_SOURCE -g -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)
+TREMA_CONFIG = $(shell which trema-config)
+ifeq ($(TREMA_CONFIG),)
+ TREMA_CONFIG = $(TREMA)/trema-config
+endif
+
+CFLAGS = $(shell $(TREMA_CONFIG) --cflags) -std=gnu99 -D_GNU_SOURCE -g -fno-strict-aliasing -Werror -Wall -Wextra -Wformat=2 -Wcast-qual -Wcast-align -Wwrite-strings -Wconversion -Wfloat-equal -Wpointer-arith
+LDFLAGS = $(shell $(TREMA_CONFIG) --libs)
TARGET_MANAGER = flow_manager
SRCS_MANAGER = flow_manager.c flow_manager_interface.c
View
11 load_balance_switch/Makefile
@@ -1,12 +1,17 @@
#
-# Copyright (C) 2011 NEC Corporation
+# Copyright (C) 2011-2013 NEC Corporation
#
TREMA = ../../trema
+TREMA_CONFIG = $(shell which trema-config)
+ifeq ($(TREMA_CONFIG),)
+ TREMA_CONFIG = $(TREMA)/trema-config
+endif
+
CC = gcc
-CFLAGS = $(shell $(TREMA)/trema-config --cflags) -I../topology -I../path_manager -std=gnu99 -D_GNU_SOURCE -Wall -g
-LDFLAGS = $(shell $(TREMA)/trema-config --libs) -L../topology -ltopology
+CFLAGS = $(shell $(TREMA_CONFIG) --cflags) -I../topology -I../path_manager -std=gnu99 -D_GNU_SOURCE -Wall -g
+LDFLAGS = $(shell $(TREMA_CONFIG) --libs) -L../topology -ltopology
TARGET = switch
SRCS = fdb.c path_resolver.c port.c switch.c
View
11 packetin_dispatcher/Makefile
@@ -1,13 +1,18 @@
#
-# Copyright (C) 2011 NEC Corporation
+# Copyright (C) 2011-2013 NEC Corporation
#
TREMA = ../../trema
SHELL = /bin/sh
+TREMA_CONFIG = $(shell which trema-config)
+ifeq ($(TREMA_CONFIG),)
+ TREMA_CONFIG = $(TREMA)/trema-config
+endif
+
CC = gcc
-CFLAGS = $(shell $(TREMA)/trema-config --cflags) -I../topology -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)
+CFLAGS = $(shell $(TREMA_CONFIG) --cflags) -I../topology -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_CONFIG) --libs)
TARGET = packetin_dispatcher
SRCS = packetin_dispatcher.c
View
11 path_manager/Makefile
@@ -1,12 +1,17 @@
#
-# Copyright (C) 2011 NEC Corporation
+# Copyright (C) 2011-2013 NEC Corporation
#
TREMA = ../../trema
+TREMA_CONFIG = $(shell which trema-config)
+ifeq ($(TREMA_CONFIG),)
+ TREMA_CONFIG = $(TREMA)/trema-config
+endif
+
CC = gcc
-CFLAGS = $(shell $(TREMA)/trema-config --cflags) -std=gnu99 -D_GNU_SOURCE -Wall -g
-LDFLAGS = $(shell $(TREMA)/trema-config --libs)
+CFLAGS = $(shell $(TREMA_CONFIG) --cflags) -std=gnu99 -D_GNU_SOURCE -Wall -g
+LDFLAGS = $(shell $(TREMA_CONFIG) --libs)
TARGET = path_manager
SRCS = path_manager.c
View
11 redirectable_routing_switch/Makefile
@@ -1,12 +1,17 @@
#
-# Copyright (C) 2011 NEC Corporation
+# Copyright (C) 2011-2013 NEC Corporation
#
TREMA = ../../trema
+TREMA_CONFIG = $(shell which trema-config)
+ifeq ($(TREMA_CONFIG),)
+ TREMA_CONFIG = $(TREMA)/trema-config
+endif
+
CC = gcc
-CFLAGS = $(shell $(TREMA)/trema-config --cflags) -I../topology -std=gnu99 -D_GNU_SOURCE -g -Wall
-LDFLAGS = $(shell $(TREMA)/trema-config --libs) -L../topology -ltopology -lsqlite3
+CFLAGS = $(shell $(TREMA_CONFIG) --cflags) -I../topology -std=gnu99 -D_GNU_SOURCE -g -Wall
+LDFLAGS = $(shell $(TREMA_CONFIG) --libs) -L../topology -ltopology -lsqlite3
TARGET = redirectable_routing_switch
SRCS = authenticator.c fdb.c libpathresolver.c port.c redirectable_routing_switch.c redirector.c
View
11 routing_switch/Makefile
@@ -1,14 +1,19 @@
#
-# Copyright (C) 2011 NEC Corporation
+# Copyright (C) 2011-2013 NEC Corporation
#
TREMA = ../../trema
GEM_BIN = `ruby -e 'require "rubygems"; puts Gem::bindir'`
SHELL = /bin/sh
+TREMA_CONFIG = $(shell which trema-config)
+ifeq ($(TREMA_CONFIG),)
+ TREMA_CONFIG = $(TREMA)/trema-config
+endif
+
CC = gcc
-CFLAGS = $(shell $(TREMA)/trema-config --cflags) -I../topology -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) -L../topology -ltopology
+CFLAGS = $(shell $(TREMA_CONFIG) --cflags) -I../topology -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_CONFIG) --libs) -L../topology -ltopology
TARGET = routing_switch
SRCS = fdb.c libpathresolver.c port.c routing_switch.c
View
12 show_description/Makefile
@@ -1,15 +1,19 @@
#
-# Copyright (C) 2012 NEC Corporation
+# Copyright (C) 2012-2013 NEC Corporation
#
TREMA = ../../trema
GEM_BIN = `ruby -e 'require "rubygems"; puts Gem::bindir'`
SHELL = /bin/sh
-CC = gcc
+TREMA_CONFIG = $(shell which trema-config)
+ifeq ($(TREMA_CONFIG),)
+ TREMA_CONFIG = $(TREMA)/trema-config
+endif
-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)
+CC = gcc
+CFLAGS = $(shell $(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_CONFIG) --libs)
TARGET = show_description
SRCS = show_description.c
View
11 simple_load_balancer/Makefile
@@ -1,12 +1,17 @@
#
-# Copyright (C) 2011 NEC Corporation
+# Copyright (C) 2011-2013 NEC Corporation
#
TREMA = ../../trema
+TREMA_CONFIG = $(shell which trema-config)
+ifeq ($(TREMA_CONFIG),)
+ TREMA_CONFIG = $(TREMA)/trema-config
+endif
+
CC = gcc
-CFLAGS = $(shell $(TREMA)/trema-config --cflags) -std=gnu99 -D_GNU_SOURCE -Wall
-LDFLAGS = $(shell $(TREMA)/trema-config --libs)
+CFLAGS = $(shell $(TREMA_CONFIG) --cflags) -std=gnu99 -D_GNU_SOURCE -Wall
+LDFLAGS = $(shell $(TREMA_CONFIG) --libs)
TARGET = simple_load_balancer
SRCS = simple_load_balancer.c
View
11 sliceable_switch/Makefile
@@ -1,14 +1,19 @@
#
-# Copyright (C) 2011-2012 NEC Corporation
+# Copyright (C) 2011-2013 NEC Corporation
#
TREMA = ../../trema
GEM_BIN = `ruby -e 'require "rubygems"; puts Gem::bindir'`
TREMA_APPS = ..
+TREMA_CONFIG = $(shell which trema-config)
+ifeq ($(TREMA_CONFIG),)
+ TREMA_CONFIG = $(TREMA)/trema-config
+endif
+
CC = gcc
-CFLAGS = $(shell $(TREMA)/trema-config --cflags) -I$(TREMA_APPS)/topology -I$(TREMA_APPS)/flow_manager -std=gnu99 -g -D_GNU_SOURCE -Wall
-LDFLAGS = $(shell $(TREMA)/trema-config --libs) -L$(TREMA_APPS)/topology -ltopology -L$(TREMA_APPS)/flow_manager -lpath
+CFLAGS = $(shell $(TREMA_CONFIG) --cflags) -I$(TREMA_APPS)/topology -I$(TREMA_APPS)/flow_manager -std=gnu99 -g -D_GNU_SOURCE -Wall
+LDFLAGS = $(shell $(TREMA_CONFIG) --libs) -L$(TREMA_APPS)/topology -ltopology -L$(TREMA_APPS)/flow_manager -lpath
TARGET = sliceable_switch
SRCS = fdb.c filter.c libpathresolver.c port.c sliceable_switch.c slice.c redirector.c
View
11 topology/Makefile
@@ -1,17 +1,22 @@
#
-# Copyright (C) 2011 NEC Corporation
+# Copyright (C) 2011-2013 NEC Corporation
#
TREMA = ../../trema
GEM_BIN = `ruby -e 'require "rubygems"; puts Gem::bindir'`
SHELL = /bin/sh
+TREMA_CONFIG = $(shell which trema-config)
+ifeq ($(TREMA_CONFIG),)
+ TREMA_CONFIG = $(TREMA)/trema-config
+endif
+
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)
+CFLAGS = $(shell $(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_CONFIG) --libs)
TARGET_LIB = libtopology.a
SRCS_LIB = libtopology.c topology_service_interface_option_parser.c

0 comments on commit 2f43863

Please sign in to comment.