Skip to content

Commit

Permalink
Modify Makefiles for trema installed as rubygems
Browse files Browse the repository at this point in the history
  • Loading branch information
Kazuya Suzuki committed Jan 7, 2013
1 parent 808f13e commit 2f43863
Show file tree
Hide file tree
Showing 12 changed files with 96 additions and 37 deletions.
11 changes: 8 additions & 3 deletions broadcast_helper/Makefile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
11 changes: 8 additions & 3 deletions flow_dumper/Makefile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
11 changes: 8 additions & 3 deletions flow_manager/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (C) 2011 NEC Corporation
# Copyright (C) 2011-2013 NEC Corporation
#

TREMA = ../../trema
Expand All @@ -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
Expand Down
11 changes: 8 additions & 3 deletions load_balance_switch/Makefile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
11 changes: 8 additions & 3 deletions packetin_dispatcher/Makefile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
11 changes: 8 additions & 3 deletions path_manager/Makefile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
11 changes: 8 additions & 3 deletions redirectable_routing_switch/Makefile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
11 changes: 8 additions & 3 deletions routing_switch/Makefile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
12 changes: 8 additions & 4 deletions show_description/Makefile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
11 changes: 8 additions & 3 deletions simple_load_balancer/Makefile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
11 changes: 8 additions & 3 deletions sliceable_switch/Makefile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
11 changes: 8 additions & 3 deletions topology/Makefile
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 2f43863

Please sign in to comment.