summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/ramulator/package.py
blob: fea91205dc4dfbf7e06d6a7343cf636c54122dad (plain) (blame)
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
# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)

from spack.package import *


class Ramulator(MakefilePackage):
    """
    Ramulator is a fast and cycle-accurate DRAM simulator that supports
    a wide array of commercial, as well as academic, DRAM standards.
    """

    homepage = "https://github.com/CMU-SAFARI/ramulator"
    git = "https://github.com/CMU-SAFARI/ramulator"

    maintainers("jjwilke")

    license("MIT")

    version("sst", commit="7d2e72306c6079768e11a1867eb67b60cee34a1c")

    patch("ramulator_sha_7d2e723_gcc48Patch.patch", when="@sst")
    patch("ramulator_sha_7d2e723_libPatch.patch", when="@sst")

    def patch(self):
        filter_file("-fpic", self.compiler.cxx_pic_flag, "Makefile")

    def build(self, spec, prefix):
        if spec.satisfies("platform=darwin"):
            make("libramulator.a")
        else:
            make("libramulator.so")

    def install(self, spec, prefix):
        install_tree(".", prefix)