Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100755 61 lines (49 sloc) 1.484 kb
deeb6070 » yasuhito
2011-04-20 released
1 #! /usr/bin/env ruby
2 #
3 # Trema compile helper.
4 #
5 # Author: Yasuhito Takamiya <yasuhito@gmail.com>
6 #
82a0ad31 » yasuhito
2012-01-18 Copyright 2008-2012
7 # Copyright (C) 2008-2012 NEC Corporation
deeb6070 » yasuhito
2011-04-20 released
8 #
9 # This program is free software; you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License, version 2, as
11 # published by the Free Software Foundation.
12 #
13 # This program is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
17 #
18 # You should have received a copy of the GNU General Public License along
19 # with this program; if not, write to the Free Software Foundation, Inc.,
20 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21 #
22
23
24 $LOAD_PATH.unshift( File.expand_path( File.dirname( __FILE__ ) + "/ruby" ) )
25
26
27 require "fileutils"
28 require "optparse"
29 require "trema/path"
30
31
32 $opts = OptionParser.new
33
34 FileUtils.cd Trema.home do
35 $opts.banner = "Usage: #{ $0 } [OPTIONS ...]"
36
37 $opts.on( "-c", "--cflags" ) do
38 $cflags = true
39 end
40 $opts.on( "-l", "--libs" ) do
41 $libs = true
42 end
43
44 $opts.parse! ARGV
45
46 output = []
47 if $cflags
48 output << "-I#{ Trema.home }/src/lib -I#{ Trema.openflow }"
49 end
50 if $libs
c757331a » chibacchie
2011-09-02 Add preliminary persistent storage implementation.
51 output << "-L#{ Trema.objects }/lib -ltrema -lrt -lpthread -lsqlite3 -ldl"
deeb6070 » yasuhito
2011-04-20 released
52 end
53 print output.join( " " )
54 end
55
56
57 ### Local variables:
58 ### mode: Ruby
59 ### coding: utf-8
60 ### indent-tabs-mode: nil
61 ### End:
Something went wrong with that request. Please try again.