~ubuntu-branches/ubuntu/wily/verilator/wily-proposed

« back to all changes in this revision

Viewing changes to src/V3EmitMk.cpp

  • Committer: Package Import Robot
  • Author(s): أحمد المحمودي (Ahmed El-Mahmoudy)
  • Date: 2015-04-26 16:20:52 UTC
  • mfrom: (4.1.5 experimental)
  • Revision ID: package-import@ubuntu.com-20150426162052-69yjwh512m0adl2k
Tags: 3.872-2
* Upload to unstable.
* debian/patches/*: Added DEP-3 patch headers.
* Remove debian/gbp.conf, not needed in master branch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
//
7
7
//*************************************************************************
8
8
//
9
 
// Copyright 2004-2014 by Wilson Snyder.  This program is free software; you can
 
9
// Copyright 2004-2015 by Wilson Snyder.  This program is free software; you can
10
10
// redistribute it and/or modify it under the terms of either the GNU
11
11
// Lesser General Public License Version 3 or the Perl Artistic License
12
12
// Version 2.0.
29
29
#include <algorithm>
30
30
 
31
31
#include "V3Global.h"
 
32
#include "V3Os.h"
32
33
#include "V3EmitMk.h"
33
34
#include "V3EmitCBase.h"
34
35
 
46
47
    }
47
48
 
48
49
    void putMakeClassEntry(V3OutMkFile& of, const string& name) {
49
 
        of.puts("\t"+V3Options::filenameNonDirExt(name)+" \\\n");
 
50
        of.puts("\t"+V3Os::filenameNonDirExt(name)+" \\\n");
50
51
    }
51
52
 
52
53
    void emitClassMake() {
83
84
                    if (v3Global.opt.savable()) {
84
85
                        putMakeClassEntry(of, "verilated_save.cpp");
85
86
                    }
 
87
                    if (v3Global.opt.coverage()) {
 
88
                        putMakeClassEntry(of, "verilated_cov.cpp");
 
89
                    }
86
90
                    if (v3Global.opt.systemPerl()) {
87
91
                        putMakeClassEntry(of, "Sp.cpp");  // Note Sp.cpp includes SpTraceVcdC
88
92
                    }
89
93
                    else {
90
 
                        if (v3Global.opt.coverage()) {
91
 
                            putMakeClassEntry(of, "SpCoverage.cpp");
92
 
                        }
93
94
                        if (v3Global.opt.trace()) {
94
95
                            putMakeClassEntry(of, "verilated_vcd_c.cpp");
95
96
                            if (v3Global.opt.systemC()) {
184
185
        const V3StringSet& cppFiles = v3Global.opt.cppFiles();
185
186
        for (V3StringSet::const_iterator it = cppFiles.begin(); it != cppFiles.end(); ++it) {
186
187
            string cppfile = *it;
187
 
            of.puts("\t"+V3Options::filenameNonExt(cppfile)+" \\\n");
188
 
            string dir = V3Options::filenameDir(cppfile);
 
188
            of.puts("\t"+V3Os::filenameNonExt(cppfile)+" \\\n");
 
189
            string dir = V3Os::filenameDir(cppfile);
189
190
            if (dirs.find(dir) == dirs.end()) dirs.insert(dir);
190
191
        }
191
192
        of.puts("\n");
209
210
            of.puts("\n");
210
211
            for (V3StringSet::const_iterator it = cppFiles.begin(); it != cppFiles.end(); ++it) {
211
212
                string cppfile = *it;
212
 
                string basename = V3Options::filenameNonExt(cppfile);
 
213
                string basename = V3Os::filenameNonExt(cppfile);
213
214
                of.puts(basename+".o: "+cppfile+"\n");
214
215
                of.puts("\t$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(OPT_FAST) -c -o $@ $<\n");
215
216
            }