makelib/config-linux-gnu.make
author Jan Vrany <jan.vrany@fit.cvut.cz>
Mon, 17 Jun 2019 21:01:14 +0000
changeset 264 e7a4c71cd36a
parent 246 687c4889e2e6
child 285 0cfb07f8d038
permissions -rw-r--r--
rakefiles: call package's `make installProg installAux` ...when "installing" installing a package. This allows individual packages to define additional files to install. Usefull to install bundled libraries and/or other resources in toy archive without having to hack rakefiles itself.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
122
6fcb351d23a7 Use our own make configuration files rather than eXept's
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     1
#------------------ start of linux-elf/COMMON/defines ---------------------
6fcb351d23a7 Use our own make configuration files rather than eXept's
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     2
#
6fcb351d23a7 Use our own make configuration files rather than eXept's
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     3
# $Header: /cvs/stx/stx/configurations/linux-elf/COMMON/defines,v 1.92 2016-07-19 19:56:46 stefan Exp $
135
0325651d2b43 Makefiles: use our own makefiles rather than eXept's
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 126
diff changeset
     4
include $(MAKELIB)/config.make
122
6fcb351d23a7 Use our own make configuration files rather than eXept's
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     5
6fcb351d23a7 Use our own make configuration files rather than eXept's
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     6
CCARCHCOMMONOPT=-DELF
6fcb351d23a7 Use our own make configuration files rather than eXept's
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     7
#RELOCINSTVARS=+relocInstvars
6fcb351d23a7 Use our own make configuration files rather than eXept's
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     8
6fcb351d23a7 Use our own make configuration files rather than eXept's
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     9
INTERN_H=linuxIntern.h
6fcb351d23a7 Use our own make configuration files rather than eXept's
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    10
CPUINTERN_H=$(INCLUDE)/linuxIntern.h
193
099cc5f9ff8e Makefiles: refactored flags for X11 to use `pkg-config`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 192
diff changeset
    11
OS=-DLINUX
122
6fcb351d23a7 Use our own make configuration files rather than eXept's
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    12
6fcb351d23a7 Use our own make configuration files rather than eXept's
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    13
MAKEFILE_EXTENSION=linux-elf
6fcb351d23a7 Use our own make configuration files rather than eXept's
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    14
SETUP_RULE=setup_linux
6fcb351d23a7 Use our own make configuration files rather than eXept's
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    15
182
f3d06fad7606 Makefiles: (temporarily) use GCC 4.x, 5.x or 6.x
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
    16
# We need to use at most GCC 6.x, some code may fail to compile
f3d06fad7606 Makefiles: (temporarily) use GCC 4.x, 5.x or 6.x
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
    17
# with GCC 7 due to -Werror (`send.c` for instance). We won't fix
246
687c4889e2e6 Rakefiles: allow to specify C compiler on a command line / in environment
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 244
diff changeset
    18
# that for Smalltalk/X 6.x.x, will be fixed only for Smalltalk/X 8.1.x 
687c4889e2e6 Rakefiles: allow to specify C compiler on a command line / in environment
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 244
diff changeset
    19
# series. 
687c4889e2e6 Rakefiles: allow to specify C compiler on a command line / in environment
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 244
diff changeset
    20
# 
687c4889e2e6 Rakefiles: allow to specify C compiler on a command line / in environment
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 244
diff changeset
    21
# Note, that we have to use the trick with `ifeq $(origin CC),...` rather than
687c4889e2e6 Rakefiles: allow to specify C compiler on a command line / in environment
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 244
diff changeset
    22
# `ifdef` since CC is one of the GNU make implicit variables. series
687c4889e2e6 Rakefiles: allow to specify C compiler on a command line / in environment
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 244
diff changeset
    23
#
687c4889e2e6 Rakefiles: allow to specify C compiler on a command line / in environment
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 244
diff changeset
    24
# See https://www.gnu.org/software/make/manual/html_node/Implicit-Variables.html
687c4889e2e6 Rakefiles: allow to specify C compiler on a command line / in environment
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 244
diff changeset
    25
ifeq ($(origin CC),default)
232
85c422506875 Makefiles: allow to specify C compiler on a command line
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 226
diff changeset
    26
  ifneq ($(shell which gcc-6),)
85c422506875 Makefiles: allow to specify C compiler on a command line
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 226
diff changeset
    27
    CC = gcc-6
85c422506875 Makefiles: allow to specify C compiler on a command line
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 226
diff changeset
    28
  else ifneq ($(shell which gcc-5),)
85c422506875 Makefiles: allow to specify C compiler on a command line
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 226
diff changeset
    29
    CC = gcc-5
85c422506875 Makefiles: allow to specify C compiler on a command line
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 226
diff changeset
    30
  else ifneq ($(shell which gcc-4),)
85c422506875 Makefiles: allow to specify C compiler on a command line
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 226
diff changeset
    31
    CC = gcc-4
85c422506875 Makefiles: allow to specify C compiler on a command line
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 226
diff changeset
    32
  endif
182
f3d06fad7606 Makefiles: (temporarily) use GCC 4.x, 5.x or 6.x
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
    33
endif