targets/OSX/__init__.py
author Edouard Tisserant <edouard.tisserant@gmail.com>
Wed, 12 Apr 2023 19:28:37 +0200
branchpython3
changeset 3791 c98646b1c981
parent 3779 31c9409a5841
child 3799 2b995a4963a4
permissions -rw-r--r--
Fixes for wxPython-4.0.7 (ubuntu22) compatible with wxPython-4.1.x
3778
296e459efdfb Preliminary OSX support
GP Orcullo <kinsamanka@gmail.com>
parents:
diff changeset
     1
#!/usr/bin/env python
296e459efdfb Preliminary OSX support
GP Orcullo <kinsamanka@gmail.com>
parents:
diff changeset
     2
# -*- coding: utf-8 -*-
296e459efdfb Preliminary OSX support
GP Orcullo <kinsamanka@gmail.com>
parents:
diff changeset
     3
296e459efdfb Preliminary OSX support
GP Orcullo <kinsamanka@gmail.com>
parents:
diff changeset
     4
# This file is part of Beremiz, a Integrated Development Environment for
296e459efdfb Preliminary OSX support
GP Orcullo <kinsamanka@gmail.com>
parents:
diff changeset
     5
# programming IEC 61131-3 automates supporting plcopen standard and CanFestival.
296e459efdfb Preliminary OSX support
GP Orcullo <kinsamanka@gmail.com>
parents:
diff changeset
     6
#
296e459efdfb Preliminary OSX support
GP Orcullo <kinsamanka@gmail.com>
parents:
diff changeset
     7
# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD
296e459efdfb Preliminary OSX support
GP Orcullo <kinsamanka@gmail.com>
parents:
diff changeset
     8
#
296e459efdfb Preliminary OSX support
GP Orcullo <kinsamanka@gmail.com>
parents:
diff changeset
     9
# See COPYING file for copyrights details.
296e459efdfb Preliminary OSX support
GP Orcullo <kinsamanka@gmail.com>
parents:
diff changeset
    10
#
296e459efdfb Preliminary OSX support
GP Orcullo <kinsamanka@gmail.com>
parents:
diff changeset
    11
# This program is free software; you can redistribute it and/or
296e459efdfb Preliminary OSX support
GP Orcullo <kinsamanka@gmail.com>
parents:
diff changeset
    12
# modify it under the terms of the GNU General Public License
296e459efdfb Preliminary OSX support
GP Orcullo <kinsamanka@gmail.com>
parents:
diff changeset
    13
# as published by the Free Software Foundation; either version 2
296e459efdfb Preliminary OSX support
GP Orcullo <kinsamanka@gmail.com>
parents:
diff changeset
    14
# of the License, or (at your option) any later version.
296e459efdfb Preliminary OSX support
GP Orcullo <kinsamanka@gmail.com>
parents:
diff changeset
    15
#
296e459efdfb Preliminary OSX support
GP Orcullo <kinsamanka@gmail.com>
parents:
diff changeset
    16
# This program is distributed in the hope that it will be useful,
296e459efdfb Preliminary OSX support
GP Orcullo <kinsamanka@gmail.com>
parents:
diff changeset
    17
# but WITHOUT ANY WARRANTY; without even the implied warranty of
296e459efdfb Preliminary OSX support
GP Orcullo <kinsamanka@gmail.com>
parents:
diff changeset
    18
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
296e459efdfb Preliminary OSX support
GP Orcullo <kinsamanka@gmail.com>
parents:
diff changeset
    19
# GNU General Public License for more details.
296e459efdfb Preliminary OSX support
GP Orcullo <kinsamanka@gmail.com>
parents:
diff changeset
    20
#
296e459efdfb Preliminary OSX support
GP Orcullo <kinsamanka@gmail.com>
parents:
diff changeset
    21
# You should have received a copy of the GNU General Public License
296e459efdfb Preliminary OSX support
GP Orcullo <kinsamanka@gmail.com>
parents:
diff changeset
    22
# along with this program; if not, write to the Free Software
296e459efdfb Preliminary OSX support
GP Orcullo <kinsamanka@gmail.com>
parents:
diff changeset
    23
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
296e459efdfb Preliminary OSX support
GP Orcullo <kinsamanka@gmail.com>
parents:
diff changeset
    24
296e459efdfb Preliminary OSX support
GP Orcullo <kinsamanka@gmail.com>
parents:
diff changeset
    25
296e459efdfb Preliminary OSX support
GP Orcullo <kinsamanka@gmail.com>
parents:
diff changeset
    26
from ..toolchain_gcc import toolchain_gcc
296e459efdfb Preliminary OSX support
GP Orcullo <kinsamanka@gmail.com>
parents:
diff changeset
    27
296e459efdfb Preliminary OSX support
GP Orcullo <kinsamanka@gmail.com>
parents:
diff changeset
    28
296e459efdfb Preliminary OSX support
GP Orcullo <kinsamanka@gmail.com>
parents:
diff changeset
    29
class OSX_target(toolchain_gcc):
296e459efdfb Preliminary OSX support
GP Orcullo <kinsamanka@gmail.com>
parents:
diff changeset
    30
    dlopen_prefix = "./"
296e459efdfb Preliminary OSX support
GP Orcullo <kinsamanka@gmail.com>
parents:
diff changeset
    31
    extension = ".dynlib"
296e459efdfb Preliminary OSX support
GP Orcullo <kinsamanka@gmail.com>
parents:
diff changeset
    32
296e459efdfb Preliminary OSX support
GP Orcullo <kinsamanka@gmail.com>
parents:
diff changeset
    33
    def getBuilderCFLAGS(self):
296e459efdfb Preliminary OSX support
GP Orcullo <kinsamanka@gmail.com>
parents:
diff changeset
    34
        return toolchain_gcc.getBuilderCFLAGS(self) + \
3779
31c9409a5841 silence compile warnings
GP Orcullo <kinsamanka@gmail.com>
parents: 3778
diff changeset
    35
            ["-fPIC", "-Wno-deprecated-declarations",
31c9409a5841 silence compile warnings
GP Orcullo <kinsamanka@gmail.com>
parents: 3778
diff changeset
    36
             "-Wno-implicit-function-declaration", "-Wno-int-conversion",
31c9409a5841 silence compile warnings
GP Orcullo <kinsamanka@gmail.com>
parents: 3778
diff changeset
    37
             "-Wno-parentheses-equality", "-Wno-varargs"]
3778
296e459efdfb Preliminary OSX support
GP Orcullo <kinsamanka@gmail.com>
parents:
diff changeset
    38
296e459efdfb Preliminary OSX support
GP Orcullo <kinsamanka@gmail.com>
parents:
diff changeset
    39
    def getBuilderLDFLAGS(self):
296e459efdfb Preliminary OSX support
GP Orcullo <kinsamanka@gmail.com>
parents:
diff changeset
    40
        return toolchain_gcc.getBuilderLDFLAGS(self) + ["-shared"]