mirror of
https://github.com/Interlisp/maiko.git
synced 2026-03-19 16:11:45 +00:00
Compare commits
7 Commits
fgh_makefi
...
fgh_redo-l
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bbe011c583 | ||
|
|
54c81a3762 | ||
|
|
6c20a5c635 | ||
|
|
1195048b1b | ||
|
|
7a286a8f1f | ||
|
|
034c52b86f | ||
|
|
a26cafcbda |
@@ -37,9 +37,12 @@ IF(NEED_LIB_M)
|
||||
ENDIF()
|
||||
|
||||
IF (CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(LIBBSD-OVERLAY REQUIRED IMPORTED_TARGET "libbsd-overlay")
|
||||
SET(MAIKO_LIBRARIES ${MAIKO_LIBRARIES} PkgConfig::LIBBSD-OVERLAY)
|
||||
CHECK_LIBRARY_EXISTS(c strlcat "" NO_NEED_FOR_LIBBSD)
|
||||
IF(NOT NO_NEED_FOR_LIBBSD)
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(LIBBSD-OVERLAY REQUIRED IMPORTED_TARGET "libbsd-overlay")
|
||||
SET(MAIKO_LIBRARIES ${MAIKO_LIBRARIES} PkgConfig::LIBBSD-OVERLAY)
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
SET (MAIKO_RELEASE 351 CACHE STRING "Release version to build. Release: 115, 200, 201, 210, 300, 350, 351")
|
||||
@@ -559,7 +562,9 @@ if(NOT res EQUAL 0)
|
||||
message(FATAL_ERROR "machinetype script failed")
|
||||
endif()
|
||||
|
||||
set(release_dir "${os_ver}.${machine_type}")INSTALL(TARGETS lde DESTINATION ${release_dir})
|
||||
set(release_dir "${os_ver}.${machine_type}")
|
||||
|
||||
INSTALL(TARGETS lde DESTINATION ${release_dir})
|
||||
|
||||
IF(MAIKO_DISPLAY_X11)
|
||||
INSTALL(TARGETS ldex ldeinit DESTINATION ${release_dir})
|
||||
|
||||
@@ -8,8 +8,11 @@ ifeq ($(USE_LIBBSD),T)
|
||||
# Use LIBBSD - but only if glibc < 2.38
|
||||
# Because we only need strlcat, strlcpy and friends from libbsd
|
||||
# and they are included in glibc from 2.38 on.
|
||||
GLIBC_VERSION := $(shell ldd --version | head -1 | sed -e "s/^.*\([0-9]\.[0-9][0-9]\)/\\1/")
|
||||
GLIBC_CHECK := $(shell echo "$(GLIBC_VERSION) >= 2.38" | bc)
|
||||
GLIBC_VERSION := $(shell getconf GNU_LIBC_VERSION | sed 's/glibc //')
|
||||
GLIBC_CHECK := 0
|
||||
ifneq ($(GLIBC_VERSION),)
|
||||
GLIBC_CHECK := $(shell echo "$(GLIBC_VERSION) >= 2.38" | bc)
|
||||
endif
|
||||
ifneq ($(GLIBC_CHECK),1)
|
||||
include linux-libbsd.mk
|
||||
endif
|
||||
|
||||
@@ -1,36 +1,33 @@
|
||||
# Select whether to use clang or gcc
|
||||
# Priority
|
||||
# 1. If -DUSE_GCC or -DUSE_CLANG on command line (but not both) use the requested compiler.
|
||||
# 2. If one compiler is installed but not the other, use the installed compiler.
|
||||
# 3. Use clang
|
||||
# 1. If USE_COMPILER=gcc or USE_COMPILER=clang on make command line use the requested compiler.
|
||||
# 2. If clang is installed use it.
|
||||
# 3. Use gcc
|
||||
|
||||
EXISTS_GCC := $(shell command -v gcc)
|
||||
EXISTS_CLANG := $(shell command -v clang)
|
||||
ifeq ($(or $(EXISTS_GCC),$(EXISTS_CLANG)),)
|
||||
$(error "Cannot find compiler: neither gcc nor clang. Exiting.")
|
||||
endif
|
||||
ifneq ($(and $(USE_CLANG),$(USE_GCC)),)
|
||||
$(error "Cannot use both USE_CLANG=T and USE_GCC=T. Exiting.")
|
||||
endif
|
||||
COMPILER :=
|
||||
ifdef USE_CLANG
|
||||
ifeq ($(USE_COMPILER),clang)
|
||||
ifeq ($(EXISTS_CLANG),)
|
||||
$(error "USE_CLANG=T given, but cannot find the clang compiler. Exiting")
|
||||
$(error "USE_COMPILER=clang, but cannot find the clang compiler. Exiting")
|
||||
endif
|
||||
COMPILER := clang
|
||||
endif
|
||||
ifdef USE_GCC
|
||||
else ifeq ($(USE_COMPILER),gcc)
|
||||
ifeq ($(EXISTS_GCC),)
|
||||
$(error "USE_GCC=T given, but cannot find the gcc compiler. Exiting")
|
||||
$(error "USE_COMPILER=gcc given, but cannot find the gcc compiler. Exiting")
|
||||
endif
|
||||
COMPILER := gcc
|
||||
else ifneq ($(EXISTS_CLANG),)
|
||||
COMPILER := clang
|
||||
else
|
||||
COMPILER := gcc
|
||||
endif
|
||||
|
||||
ifeq ($(COMPILER),)
|
||||
ifneq ($(EXISTS_CLANG),)
|
||||
COMPILER := clang
|
||||
else
|
||||
COMPILER := gcc
|
||||
endif
|
||||
$(error "Oops. Trying to select gcc or clang but should never get here")
|
||||
endif
|
||||
|
||||
ifeq ($(COMPILER),gcc)
|
||||
|
||||
Reference in New Issue
Block a user