1
0
mirror of https://github.com/Interlisp/maiko.git synced 2026-03-24 17:26:16 +00:00

Compare commits

...

25 Commits

Author SHA1 Message Date
Nick Briggs
9259716e9a Merge pull request #544 from Interlisp/fgh_redo-linux-makefiles
Consolidate PRs 542 and 543 and slightly update:  Redo linux makefiles to include libbsd where necessary and to abstract out common parts and share them across all linux-y makefiles
2026-03-19 14:47:23 -07:00
Nick Briggs
519c13891b Fixes missing quoting for sh -c 2026-03-19 12:33:02 -07:00
Nick Briggs
ee21e482a7 Invoke "command" with /bin/sh -c from makefile to avoid not-found errors 2026-03-19 11:16:16 -07:00
Frank Halasz
bbe011c583 Take geminis suggestion on getting glibc version number in linux-common.mk 2026-03-18 01:27:16 -07:00
Frank Halasz
54c81a3762 Fixed comment in linux-compiler.mk 2026-03-18 01:15:21 -07:00
Frank Halasz
6c20a5c635 Fixed comment in linux-compiler.mk 2026-03-18 01:03:32 -07:00
Frank Halasz
1195048b1b Ooops. Took out debugging code. 2026-03-18 00:51:03 -07:00
Frank Halasz
7a286a8f1f Fix sed script in linux-common.mk 2026-03-18 00:50:14 -07:00
Frank Halasz
034c52b86f In CMakelists, limit use of libbsd for linux to cases where libc does not include strlcat 2026-03-18 00:25:28 -07:00
Frank Halasz
a26cafcbda Change USE_GCC=T/USE_CLANG=T to USE_COMPILER=clang/gcc for linux-y makefiles 2026-03-18 00:01:24 -07:00
Frank Halasz
c6f3ba4305 Including all suggestions made by Gemeni code check. Now includes linking to libbsd (if requested) only if glibc < version 2.38 since glibc >= 2.38 includes strlcat and friends. 2026-03-17 23:02:12 -07:00
Frank Halasz
3430574f61 More updates to github actions to account for deprecation of Node 20. 2026-03-14 20:43:13 -07:00
Frank Halasz
07e009cf08 Update github actions to latest versions to account for deprecation of node 20. 2026-03-14 19:37:40 -07:00
Frank Halasz
25654fa090 For Linux makefiles, automated selection of gcc versus clang compiler depending on whats installed. Refactored Linux makefiles to simplify top level makefiles with slightly more complicated common makefiles. Makefiles for Cygwin and WSL1 all rewritten to use the common linux makefiles code. 2026-03-13 23:51:50 -07:00
Frank Halasz
dadbef47bf Add pkgconf package to things loaded into the Builder Docker image to be used by libbsd changes to linux makefiles 2026-03-09 20:43:02 -07:00
Frank Halasz
41cad3e499 Update all makefiles for linux to use (by include) a common base makefile as well as common makefiles for X and sdl. These included makefiles have the name linux-*.mk. Updated all linux makefiles to use the libbsd-overlay package, using pkg-config to set the appropriate flags. Updated CMakelists to also use the libbsd-overlay package via pkgconfig for Linux only. Finally added install targets to the CMakelists file so that cmake --install . will place the lde binaries into the appropriate directory in maiko as the makefiles currently do. 2026-03-09 18:11:23 -07:00
Frank Halasz
fcbcb2c6b8 Updating all linux makefiles to use the libbsd-overlay scheme properly 2026-03-09 00:45:09 -07:00
Frank Halasz
f4021ef268 Move builder image back to 22.04 so that exe's that we build can run on systems with glibc <2.38 (e.g., Ubuntu 22.04 and Debian 12). 2026-03-01 03:21:04 -08:00
Frank Halasz
e130b0fcb7 Merge remote-tracking branch 'origin/nhb-linux-build-with-libbsd' into fgh_libbsd 2026-03-01 03:16:32 -08:00
Frank Halasz
97b84d4117 Add libbsd to ld library search for all makefile-linux* and makefile-init-linux*. Add libbsd to MAIKO_LIBRARIES (where appropriate) in CMakeLists.txt. This will support building maiko on Ubuntu 22.04 and Debian 12, where strlcat is found only in libbsd. For Ubuntu 24.04 and beyond and Debian 13 and beyond, strlcat is now in glibc (>2.38). 2026-03-01 03:00:08 -08:00
Nick Briggs
c821a73ed4 Updates build environment to Ubuntu Linux 24.04 2026-02-21 17:32:13 -08:00
Nick Briggs
d791b1d332 Merge pull request #533 from Interlisp/nhb-rewrite-version-parser-v2
Extensive rewrite of various parts of the file name/version handling code.  Converts a lot of unsafe string handling functions to safer variants.  Passes buffer sizes in various places to enable overflow checks. Removes some unused variable declarations. Updates comments.  Improves performance with alarm timeout setting when sequences of alarm set/cancel operations are performed.  Adds GETFILEINFO processing for INODE_LO and INODE_HI attributes.
2025-10-31 15:29:43 -07:00
Konrad Hinsen
853d133cda No need to do makeright init clean 2025-09-29 11:37:54 -07:00
Konrad Hinsen
0370354432 Corrected instructions for building ldeinit 2025-09-29 11:37:54 -07:00
Konrad Hinsen
f85f6ce004 Add instructions for building a function ldeinit 2025-09-29 11:37:54 -07:00
29 changed files with 295 additions and 448 deletions

View File

@@ -12,7 +12,9 @@ FROM ubuntu:22.04
SHELL ["/bin/bash", "-c"] SHELL ["/bin/bash", "-c"]
USER root:root USER root:root
# Install build tools # Install build tools
RUN apt-get update && apt-get install -y make clang libx11-dev gcc RUN apt-get update \
&& apt-get install -y build-essential gcc pkgconf make clang cmake \
&& apt-get install -y libx11-dev libbsd-dev libpcap-dev
USER root USER root
WORKDIR /root WORKDIR /root
ENTRYPOINT /bin/bash ENTRYPOINT /bin/bash

View File

@@ -13,7 +13,7 @@ jobs:
matrix: matrix:
os: [macos-11, macos-12, ubuntu-22.04, ubuntu-20.04] os: [macos-11, macos-12, ubuntu-22.04, ubuntu-20.04]
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v6
- name: Install X11 dependencies on MacOS - name: Install X11 dependencies on MacOS
if: ${{ runner.os == 'macOS'}} if: ${{ runner.os == 'macOS'}}
run: brew install --cask xquartz run: brew install --cask xquartz
@@ -28,7 +28,7 @@ jobs:
# runs-on: [self-hosted, linux, ARM] # runs-on: [self-hosted, linux, ARM]
# if: ${{ github.repository == 'Interlisp/maiko' }} # if: ${{ github.repository == 'Interlisp/maiko' }}
# steps: # steps:
# - uses: actions/checkout@v3 # - uses: actions/checkout@v6
# - name: Build # - name: Build
# working-directory: bin # working-directory: bin
# run: ./makeright x # run: ./makeright x
@@ -41,7 +41,7 @@ jobs:
env: env:
BUILD_TYPE: Release BUILD_TYPE: Release
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v6
- name: Show CMake version - name: Show CMake version
run: cmake --version run: cmake --version
- name: Install X11 dependencies on MacOS - name: Install X11 dependencies on MacOS

View File

@@ -34,7 +34,7 @@ jobs:
steps: steps:
# Checkout maiko # Checkout maiko
- name: Checkout maiko - name: Checkout maiko
uses: actions/checkout@v3 uses: actions/checkout@v6
# Setup docker environment variables # Setup docker environment variables
- name: Setup Docker Environment Variables - name: Setup Docker Environment Variables
@@ -49,18 +49,18 @@ jobs:
# Setup the Docker Machine Emulation environment. # Setup the Docker Machine Emulation environment.
- name: Set up QEMU - name: Set up QEMU
uses: docker/setup-qemu-action@master uses: docker/setup-qemu-action@v4
with: with:
platforms: linux/amd64,linux/arm64,linux/arm/v7 platforms: linux/amd64,linux/arm64,linux/arm/v7
# Setup the Docker Buildx funtion # Setup the Docker Buildx funtion
- name: Set up Docker Buildx - name: Set up Docker Buildx
id: buildx id: buildx
uses: docker/setup-buildx-action@master uses: docker/setup-buildx-action@v4
# Login to ghcr.io # Login to ghcr.io
- name: Login to GitHub Container Registry - name: Login to GitHub Container Registry
uses: docker/login-action@v2 uses: docker/login-action@v4
with: with:
registry: ghcr.io registry: ghcr.io
username: ${{ github.repository_owner }} username: ${{ github.repository_owner }}
@@ -71,7 +71,7 @@ jobs:
# #
- name: Build Docker Images for Push to GHCR - name: Build Docker Images for Push to GHCR
if: ${{ true }} if: ${{ true }}
uses: docker/build-push-action@v4 uses: docker/build-push-action@v7
with: with:
builder: ${{ steps.buildx.outputs.name }} builder: ${{ steps.buildx.outputs.name }}
build-args: | build-args: |

View File

@@ -123,7 +123,7 @@ jobs:
steps: steps:
# Checkout the actions for this repo owner # Checkout the actions for this repo owner
- name: Checkout Actions - name: Checkout Actions
uses: actions/checkout@v4 uses: actions/checkout@v6
with: with:
repository: ${{ github.repository_owner }}/.github repository: ${{ github.repository_owner }}/.github
path: ./Actions_${{ github.sha }} path: ./Actions_${{ github.sha }}
@@ -157,7 +157,7 @@ jobs:
steps: steps:
# Checkout the actions for this repo owner # Checkout the actions for this repo owner
- name: Checkout Actions - name: Checkout Actions
uses: actions/checkout@v4 uses: actions/checkout@v6
with: with:
repository: ${{ github.repository_owner }}/.github repository: ${{ github.repository_owner }}/.github
path: ./Actions_${{ github.sha }} path: ./Actions_${{ github.sha }}
@@ -165,7 +165,7 @@ jobs:
# Checkout the branch # Checkout the branch
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v6
# Setup release tag # Setup release tag
- name: Setup Release Tag - name: Setup Release Tag
@@ -185,14 +185,14 @@ jobs:
# Setup the Docker Machine Emulation environment. # Setup the Docker Machine Emulation environment.
- name: Set up QEMU - name: Set up QEMU
uses: docker/setup-qemu-action@v2 uses: docker/setup-qemu-action@v4
with: with:
platforms: linux/amd64,linux/arm64,linux/arm/v7 platforms: linux/amd64,linux/arm64,linux/arm/v7
# Setup the Docker Buildx funtion # Setup the Docker Buildx funtion
- name: Set up Docker Buildx - name: Set up Docker Buildx
id: buildx id: buildx
uses: docker/setup-buildx-action@v2 uses: docker/setup-buildx-action@v4
# Do the Docker Build using the Dockerfile in the repository we # Do the Docker Build using the Dockerfile in the repository we
# checked out. Save the results in a directory under /tmp to be used # checked out. Save the results in a directory under /tmp to be used
@@ -204,7 +204,7 @@ jobs:
# Dockerfile, NOT HERE IN THE WORKFLOW. # Dockerfile, NOT HERE IN THE WORKFLOW.
# #
- name: Build Docker Image and Save It Locally - name: Build Docker Image and Save It Locally
uses: docker/build-push-action@v4 uses: docker/build-push-action@v7
with: with:
builder: ${{ steps.buildx.outputs.name }} builder: ${{ steps.buildx.outputs.name }}
build-args: | build-args: |
@@ -246,7 +246,7 @@ jobs:
# Push Release to github # Push Release to github
- name: Push the release - name: Push the release
uses: ncipollo/release-action@v1 uses: ncipollo/release-action@v1.21.0
with: with:
allowUpdates: true allowUpdates: true
artifacts: artifacts:
@@ -280,11 +280,11 @@ jobs:
# Checkout the branch # Checkout the branch
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v6
# Checkout the actions for this repo owner # Checkout the actions for this repo owner
- name: Checkout Actions - name: Checkout Actions
uses: actions/checkout@v4 uses: actions/checkout@v6
with: with:
repository: ${{ github.repository_owner }}/.github repository: ${{ github.repository_owner }}/.github
path: ./Actions_${{ github.sha }} path: ./Actions_${{ github.sha }}
@@ -376,7 +376,7 @@ jobs:
# Push Release # Push Release
- name: Push the release - name: Push the release
uses: ncipollo/release-action@v1 uses: ncipollo/release-action@v1.21.0
with: with:
allowUpdates: true allowUpdates: true
artifacts: artifacts:
@@ -434,13 +434,13 @@ jobs:
# Checkout the branch # Checkout the branch
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v6
with: with:
path: cygwin\maiko path: cygwin\maiko
# Checkout the actions for this repo owner # Checkout the actions for this repo owner
- name: Checkout Actions - name: Checkout Actions
uses: actions/checkout@v4 uses: actions/checkout@v6
with: with:
repository: ${{ github.repository_owner }}/.github repository: ${{ github.repository_owner }}/.github
path: ./Actions_${{ github.sha }} path: ./Actions_${{ github.sha }}
@@ -470,7 +470,7 @@ jobs:
# Push Release to github # Push Release to github
- name: Push the release - name: Push the release
uses: ncipollo/release-action@v1 uses: ncipollo/release-action@v1.21.0
with: with:
allowUpdates: true allowUpdates: true
artifacts: artifacts:
@@ -501,7 +501,7 @@ jobs:
# Checkout the actions for this repo owner # Checkout the actions for this repo owner
- name: Checkout Actions - name: Checkout Actions
uses: actions/checkout@v4 uses: actions/checkout@v6
with: with:
repository: ${{ github.repository_owner }}/.github repository: ${{ github.repository_owner }}/.github
path: ./Actions_${{ github.sha }} path: ./Actions_${{ github.sha }}
@@ -530,7 +530,7 @@ jobs:
# Checkout the maiko branch # Checkout the maiko branch
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v6
# Setup release tag # Setup release tag
- name: Setup Release Tag - name: Setup Release Tag
@@ -547,7 +547,7 @@ jobs:
# Push Release to github # Push Release to github
- name: Push the release - name: Push the release
uses: ncipollo/release-action@v1 uses: ncipollo/release-action@v1.21.0
with: with:
allowUpdates: true allowUpdates: true
artifacts: ${{ steps.tag.outputs.release_tag }}-emscripten.tgz artifacts: ${{ steps.tag.outputs.release_tag }}-emscripten.tgz
@@ -573,7 +573,7 @@ jobs:
steps: steps:
# Checkout the actions for this repo owner # Checkout the actions for this repo owner
- name: Checkout Actions - name: Checkout Actions
uses: actions/checkout@v4 uses: actions/checkout@v6
with: with:
repository: ${{ github.repository_owner }}/.github repository: ${{ github.repository_owner }}/.github
path: ./Actions_${{ github.sha }} path: ./Actions_${{ github.sha }}

View File

@@ -1,6 +1,5 @@
CMAKE_MINIMUM_REQUIRED(VERSION 3.15) CMAKE_MINIMUM_REQUIRED(VERSION 3.15)
PROJECT(maiko C) PROJECT(maiko C)
SET(CMAKE_EXPORT_COMPILE_COMMANDS ON) SET(CMAKE_EXPORT_COMPILE_COMMANDS ON)
SET(CMAKE_C_STANDARD 99) SET(CMAKE_C_STANDARD 99)
@@ -37,6 +36,15 @@ IF(NEED_LIB_M)
SET(MAIKO_LIBRARIES m) SET(MAIKO_LIBRARIES m)
ENDIF() ENDIF()
IF (CMAKE_SYSTEM_NAME STREQUAL "Linux")
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") SET (MAIKO_RELEASE 351 CACHE STRING "Release version to build. Release: 115, 200, 201, 210, 300, 350, 351")
SET_PROPERTY(CACHE MAIKO_RELEASE PROPERTY STRINGS 115 200 201 210 300 350 351) SET_PROPERTY(CACHE MAIKO_RELEASE PROPERTY STRINGS 115 200 201 210 300 350 351)
@@ -448,6 +456,7 @@ ADD_CUSTOM_COMMAND(OUTPUT vdate.c
ADD_EXECUTABLE(lde src/ldeboot.c src/unixfork.c) ADD_EXECUTABLE(lde src/ldeboot.c src/unixfork.c)
TARGET_COMPILE_DEFINITIONS(lde PRIVATE ${MAIKO_DEFINITIONS}) TARGET_COMPILE_DEFINITIONS(lde PRIVATE ${MAIKO_DEFINITIONS})
TARGET_INCLUDE_DIRECTORIES(lde PRIVATE inc) TARGET_INCLUDE_DIRECTORIES(lde PRIVATE inc)
TARGET_LINK_LIBRARIES(lde ${MAIKO_LIBRARIES})
IF(MAIKO_DISPLAY_X11) IF(MAIKO_DISPLAY_X11)
# Tell it that the X11 launcher is available. # Tell it that the X11 launcher is available.
TARGET_COMPILE_DEFINITIONS(lde PRIVATE ${MAIKO_DISPLAY_X11_DEFINITIONS}) TARGET_COMPILE_DEFINITIONS(lde PRIVATE ${MAIKO_DISPLAY_X11_DEFINITIONS})
@@ -528,3 +537,38 @@ TARGET_INCLUDE_DIRECTORIES(setsout PRIVATE inc)
ADD_EXECUTABLE(tstsout src/tstsout.c src/byteswap.c) ADD_EXECUTABLE(tstsout src/tstsout.c src/byteswap.c)
TARGET_COMPILE_DEFINITIONS(tstsout PRIVATE ${MAIKO_DEFINITIONS}) TARGET_COMPILE_DEFINITIONS(tstsout PRIVATE ${MAIKO_DEFINITIONS})
TARGET_INCLUDE_DIRECTORIES(tstsout PRIVATE inc) TARGET_INCLUDE_DIRECTORIES(tstsout PRIVATE inc)
# Installation Targets
IF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/../" CACHE PATH "Installation prefix" FORCE)
ENDIF()
execute_process(
COMMAND sh "${CMAKE_SOURCE_DIR}/bin/osversion"
OUTPUT_VARIABLE os_ver
OUTPUT_STRIP_TRAILING_WHITESPACE
RESULT_VARIABLE res
)
if(NOT res EQUAL 0)
message(FATAL_ERROR "osversion script failed")
endif()
execute_process(
COMMAND sh "${CMAKE_SOURCE_DIR}/bin/machinetype"
OUTPUT_VARIABLE machine_type
OUTPUT_STRIP_TRAILING_WHITESPACE
RESULT_VARIABLE res
)
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})
IF(MAIKO_DISPLAY_X11)
INSTALL(TARGETS ldex ldeinit DESTINATION ${release_dir})
ENDIF()
IF(MAIKO_DISPLAY_SDL)
INSTALL(TARGETS ldesdl DESTINATION ${release_dir})
ENDIF()

View File

@@ -37,6 +37,7 @@ $ ./makeright x
* The build will (attempt to) detect the OS-type and cpu-type. It will build binaries `lde` and `ldex` in `../`_`ostype.cputype`_ (with .o files in `../`_`ostype.cputype-x`_. For example, Linux on a 64-bit x86 will use `linux.x86_64`, while macOS 11 on a (new M1) Mac will use `darwin.aarch64`. * The build will (attempt to) detect the OS-type and cpu-type. It will build binaries `lde` and `ldex` in `../`_`ostype.cputype`_ (with .o files in `../`_`ostype.cputype-x`_. For example, Linux on a 64-bit x86 will use `linux.x86_64`, while macOS 11 on a (new M1) Mac will use `darwin.aarch64`.
* If you prefer `gcc` over `clang`, you will need to edit the makefile fragment for your configuration (`makefile-ostype.cputype-x`) and comment out the line (with a #) that defines `CC` as `clang` and uncomment the line (delete the #) for the line that defines `CC` as `gcc`. * If you prefer `gcc` over `clang`, you will need to edit the makefile fragment for your configuration (`makefile-ostype.cputype-x`) and comment out the line (with a #) that defines `CC` as `clang` and uncomment the line (delete the #) for the line that defines `CC` as `gcc`.
* If you want to do your own loadups to construct sysout files (see [the Medley repository](https://github.com/Interlisp/medley) for details), you also need the `ldeinit` binary, which you can build using `./makeright init`.
### Building with CMake ### Building with CMake
We provide a `CMakeLists.txt` which provides mostly matching build capabilities to the `make` setup. We provide a `CMakeLists.txt` which provides mostly matching build capabilities to the `make` setup.

47
bin/linux-common.mk Normal file
View File

@@ -0,0 +1,47 @@
# Common Options for All Linuxes
include linux-compiler.mk
BSD_CFLAGS :=
BSD_LDFLAGS :=
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 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
endif
ifeq ($(USE_DISPLAY),x)
include linux-x.mk
DEFAULT_TARGET := ../$(OSARCHNAME)/lde ../$(OSARCHNAME)/ldex
endif
ifeq ($(USE_DISPLAY),sdl)
include linux-sdl.mk
DEFAULT_TARGET := ../$(OSARCHNAME)/lde ../$(OSARCHNAME)/ldesdl
endif
ifeq ($(USE_DISPLAY),init)
include linux-x.mk
DEFAULT_TARGET := ../$(OSARCHNAME)/ldeinit
endif
OPTFLAGS ?= -O2 -g3
DFLAGS = $(XFLAGS) -DRELEASE=$(RELEASE) $(BSD_CFLAGS) $(ADDITIONAL_DFLAGS)
LDFLAGS = $(XLDFLAGS) -lc -lm $(BSD_LDFLAGS)
ifeq ($(USE_DISPLAY),x)
LDELDFLAGS = $(XLDFLAGS) -lc -lm $(BSD_LDFLAGS)
else
LDELDFLAGS = -lc -lm $(BSD_LDFLAGS)
endif
OBJECTDIR = ../$(RELEASENAME)/
default: $(DEFAULT_TARGET)

37
bin/linux-compiler.mk Normal file
View File

@@ -0,0 +1,37 @@
# Select whether to use clang or gcc
# Priority
# 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 /bin/sh -c "command -v gcc")
EXISTS_CLANG := $(shell /bin/sh -c "command -v clang")
ifeq ($(or $(EXISTS_GCC),$(EXISTS_CLANG)),)
$(error "Cannot find compiler: neither gcc nor clang. Exiting.")
endif
COMPILER :=
ifeq ($(USE_COMPILER),clang)
ifeq ($(EXISTS_CLANG),)
$(error "USE_COMPILER=clang, but cannot find the clang compiler. Exiting")
endif
COMPILER := clang
else ifeq ($(USE_COMPILER),gcc)
ifeq ($(EXISTS_GCC),)
$(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),)
$(error "Oops. Trying to select gcc or clang but should never get here")
endif
ifeq ($(COMPILER),gcc)
CC := gcc $(GCC_CFLAGS)
else
CC := clang $(CLANG_CFLAGS)
endif

26
bin/linux-libbsd.mk Normal file
View File

@@ -0,0 +1,26 @@
# Check that pkg-config is available and that the libbsd-dev package is installed
# If one of these is missing, error out
# FGH 2026-03-08
ifneq ($(MAKECMDGOALS),clean)
ifneq ($(MAKECMDGOALS),cleanup)
CHK_PKG_CONFIG := $(shell /bin/sh -c "command -v pkg-config")
ifeq ($(CHK_PKG_CONFIG),)
# pkg-config not found, print an error
$(error "pkg-config not found. Please install it to build this project.")
endif
CHK_LIBBSD_DEV := $(shell pkg-config --exists libbsd-overlay && echo true)
ifneq ($(CHK_LIBBSD_DEV),true)
$(error "libbsd-dev (or libbsd-devel) package not found. Please install it to build this project.")
endif
BSD_CFLAGS := $(shell pkg-config --cflags libbsd-overlay)
BSD_LDFLAGS := $(shell pkg-config --libs libbsd-overlay)
endif # clean
endif # cleanup

14
bin/linux-sdl.mk Normal file
View File

@@ -0,0 +1,14 @@
# Common Options for Linux using SDL instead of X Windows
XFILES = $(OBJECTDIR)sdl.o
#
# For SDL version 2
# -DSDL=2 in XFLAGS and -lSDL2 in LDFLAGS
# For SDL version 3
# -DSDL=3 in XFLAGS and -lSDL3 in LDFLAGS
#
XFLAGS = -DSDL=2
XLDFLAGS ?= -lSDL2

17
bin/linux-x.mk Normal file
View File

@@ -0,0 +1,17 @@
# Common Options for Linux with X Windows
XFILES = $(OBJECTDIR)xmkicon.o \
$(OBJECTDIR)xbbt.o \
$(OBJECTDIR)dspif.o \
$(OBJECTDIR)xinit.o \
$(OBJECTDIR)xscroll.o \
$(OBJECTDIR)xcursor.o \
$(OBJECTDIR)xlspwin.o \
$(OBJECTDIR)xrdopt.o \
$(OBJECTDIR)xwinman.o
XFLAGS = -DXWINDOW
XLDFLAGS = -L/usr/X11/lib -lX11

View File

@@ -1,26 +1,9 @@
# Options for Linux, Intel x86_64 and X-Window # Options for Linux, Intel x86_64 and X-Window
CC = gcc -m64 $(GCC_CFLAGS) -I/usr/local/include GCC_CFLAGS := -m64 $(GCC_CFLAGS) -I/usr/local/include
#CC = clang -m64 $(CLANG_CFLAGS) CLANG_CFLAGS := -m64 $(CLANG_CFLAGS) -I/usr/local/include
USE_DISPLAY=sdl
USE_LIBBSD=F
XLDFLAGS := -L/usr/local/lib -lSDL2
XFILES = $(OBJECTDIR)sdl.o include linux-common.mk
#
# For SDL version 2
# -DSDL=2 in XFLAGS and -lSDL2 in LDFLAGS
# For SDL version 3
# -DSDL=3 in XFLAGS and -lSDL3 in LDFLAGS
#
XFLAGS = -DSDL=2
# OPTFLAGS is normally -O2.
OPTFLAGS = -O2 -g3
DFLAGS = $(XFLAGS) -DRELEASE=$(RELEASE)
LDFLAGS = -lm -L/usr/local/lib -lSDL2
#
LDELDFLAGS =
OBJECTDIR = ../$(RELEASENAME)/
default : ../$(OSARCHNAME)/lde ../$(OSARCHNAME)/ldesdl

View File

@@ -1,28 +1,9 @@
# Options for Linux, Intel x86_64 and X-Window # Options for Cygwin, Intel x86_64 and X-Window
#CC = gcc -m64 $(GCC_CFLAGS) GCC_CFLAGS := -m64 $(GCC_CFLAGS)
CC = clang -m64 $(CLANG_CFLAGS) CLANG_CFLAGS := -m64 $(CLANG_CFLAGS)
USE_DISPLAY=x
USE_LIBBSD=F
XFILES = $(OBJECTDIR)xmkicon.o \ include linux-common.mk
$(OBJECTDIR)xbbt.o \
$(OBJECTDIR)dspif.o \
$(OBJECTDIR)xinit.o \
$(OBJECTDIR)xscroll.o \
$(OBJECTDIR)xcursor.o \
$(OBJECTDIR)xlspwin.o \
$(OBJECTDIR)xrdopt.o \
$(OBJECTDIR)xwinman.o
XFLAGS = -DXWINDOW
# OPTFLAGS is normally -O2.
OPTFLAGS = -O2 -g3
DFLAGS = $(XFLAGS) -DRELEASE=$(RELEASE)
LDFLAGS = -L/usr/X11/lib -lX11 -lc -lm
LDELDFLAGS = -L/usr/X11/lib -lX11 -lc -lm
OBJECTDIR = ../$(RELEASENAME)/
default : ../$(OSARCHNAME)/lde ../$(OSARCHNAME)/ldex

View File

@@ -1,29 +1,9 @@
# Options for Linux, aarch64 processor, X windows, for INIT processing # Options for Linux, aarch64 processor, X windows, for INIT processing
CC = gcc $(GCC_CFLAGS)
#CC = clang $(CLANG_CFLAGS)
XFILES = $(OBJECTDIR)xmkicon.o \
$(OBJECTDIR)xbbt.o \
$(OBJECTDIR)dspif.o \
$(OBJECTDIR)xinit.o \
$(OBJECTDIR)xscroll.o \
$(OBJECTDIR)xcursor.o \
$(OBJECTDIR)xlspwin.o \
$(OBJECTDIR)xrdopt.o \
$(OBJECTDIR)xwinman.o
XFLAGS = -DXWINDOW
# OPTFLAGS is normally -O2, for INIT we want unoptimized in case we need to debug it
OPTFLAGS = -O0 -g OPTFLAGS = -O0 -g
DEBUGFLAGS = DEBUGFLAGS =
DFLAGS = $(DEBUGFLAGS) $(XFLAGS) -DRELEASE=$(RELEASE) -DNOVERSION -DINIT ADDITIONAL_DFLAGS = $(DEBUGFLAGS) -DNOVERSION -DINIT
USE_LIBBSD=T
USE_DISPLAY=init
LDFLAGS = -L/usr/X11/lib -lX11 -lc -lm include linux-common.mk
LDELDFLAGS = -L/usr/X11/lib -lX11 -lc -lm
OBJECTDIR = ../$(RELEASENAME)/
default : ../$(OSARCHNAME)/ldeinit

View File

@@ -1,29 +1,9 @@
# Options for Linux, x86 processor, X windows, for INIT processing # Options for Linux, x86 processor, X windows, for INIT processing
CC = gcc $(GCC_CFLAGS)
#CC = clang $(CLANG_CFLAGS)
XFILES = $(OBJECTDIR)xmkicon.o \
$(OBJECTDIR)xbbt.o \
$(OBJECTDIR)dspif.o \
$(OBJECTDIR)xinit.o \
$(OBJECTDIR)xscroll.o \
$(OBJECTDIR)xcursor.o \
$(OBJECTDIR)xlspwin.o \
$(OBJECTDIR)xrdopt.o \
$(OBJECTDIR)xwinman.o
XFLAGS = -DXWINDOW
# OPTFLAGS is normally -O2, for INIT we want unoptimized in case we need to debug it
OPTFLAGS = -O0 -g OPTFLAGS = -O0 -g
DEBUGFLAGS = DEBUGFLAGS =
DFLAGS = $(DEBUGFLAGS) $(XFLAGS) -DRELEASE=$(RELEASE) -DNOVERSION -DINIT ADDITIONAL_DFLAGS = $(DEBUGFLAGS) -DNOVERSION -DINIT
USE_LIBBSD=T
USE_DISPLAY=init
LDFLAGS = -L/usr/X11/lib -lX11 -lc -lm include linux-common.mk
LDELDFLAGS = -L/usr/X11/lib -lX11 -lc -lm
OBJECTDIR = ../$(RELEASENAME)/
default : ../$(OSARCHNAME)/ldeinit

View File

@@ -1,29 +1,9 @@
# Options for Windows System for Linux v1, aarch64 processor, X windows, for INIT processing # Options for Windows System for Linux v1, aarch64 processor, X windows, for INIT processing
CC = gcc $(GCC_CFLAGS)
#CC = clang $(CLANG_CFLAGS)
XFILES = $(OBJECTDIR)xmkicon.o \
$(OBJECTDIR)xbbt.o \
$(OBJECTDIR)dspif.o \
$(OBJECTDIR)xinit.o \
$(OBJECTDIR)xscroll.o \
$(OBJECTDIR)xcursor.o \
$(OBJECTDIR)xlspwin.o \
$(OBJECTDIR)xrdopt.o \
$(OBJECTDIR)xwinman.o
XFLAGS = -DXWINDOW
# OPTFLAGS is normally -O2, for INIT we want unoptimized in case we need to debug it
OPTFLAGS = -O0 -g OPTFLAGS = -O0 -g
DEBUGFLAGS = DEBUGFLAGS =
DFLAGS = $(DEBUGFLAGS) $(XFLAGS) -DRELEASE=$(RELEASE) -DNOVERSION -DINIT -D__wsl1__ ADDITIONAL_DFLAGS = $(DEBUGFLAGS) -DNOVERSION -DINIT -D__wsl1__
USE_LIBBSD=T
USE_DISPLAY=init
LDFLAGS = -L/usr/X11/lib -lX11 -lc -lm include linux-common.mk
LDELDFLAGS = -L/usr/X11/lib -lX11 -lc -lm
OBJECTDIR = ../$(RELEASENAME)/
default : ../$(OSARCHNAME)/ldeinit

View File

@@ -1,29 +1,9 @@
# Options for Windows System for Linux v1, Intel x86_64 processor, X windows, for INIT processing # Options for Windows System for Linux v1, Intel x86_64 processor, X windows, for INIT processing
CC = gcc $(GCC_CFLAGS)
#CC = clang $(CLANG_CFLAGS)
XFILES = $(OBJECTDIR)xmkicon.o \
$(OBJECTDIR)xbbt.o \
$(OBJECTDIR)dspif.o \
$(OBJECTDIR)xinit.o \
$(OBJECTDIR)xscroll.o \
$(OBJECTDIR)xcursor.o \
$(OBJECTDIR)xlspwin.o \
$(OBJECTDIR)xrdopt.o \
$(OBJECTDIR)xwinman.o
XFLAGS = -DXWINDOW
# OPTFLAGS is normally -O2, for INIT we want unoptimized in case we need to debug it
OPTFLAGS = -O0 -g OPTFLAGS = -O0 -g
DEBUGFLAGS = DEBUGFLAGS =
DFLAGS = $(DEBUGFLAGS) $(XFLAGS) -DRELEASE=$(RELEASE) -DNOVERSION -DINIT -D__wsl1__ ADDITIONAL_DFLAGS = $(DEBUGFLAGS) -DNOVERSION -DINIT -D__wsl1__
USE_LIBBSD=T
USE_DISPLAY=init
LDFLAGS = -L/usr/X11/lib -lX11 -lc -lm include linux-common.mk
LDELDFLAGS = -L/usr/X11/lib -lX11 -lc -lm
OBJECTDIR = ../$(RELEASENAME)/
default : ../$(OSARCHNAME)/ldeinit

View File

@@ -1,25 +1,8 @@
# Options for Linux, Intel 386/486 and SDL # Options for Linux, Intel 386/486 and SDL
CC = gcc -m32 $(GCC_CFLAGS) GCC_CFLAGS := -m32 $(GCC_CFLAGS)
# CC = clang $(CLANG_CFLAGS) CLANG_CFLAGS := -m32 $(CLANG_CFLAGS)
USE_DISPLAY=sdl
USE_LIBBSD=T
XFILES = $(OBJECTDIR)sdl.o include linux-common.mk
#
# For SDL version 2
# -DSDL=2 in XFLAGS and -lSDL2 in LDFLAGS
# For SDL version 3
# -DSDL=3 in XFLAGS and -lSDL3 in LDFLAGS
#
XFLAGS = -DSDL=2
# OPTFLAGS is normally -O2.
OPTFLAGS = -O2 -g3
DFLAGS = $(XFLAGS) -DRELEASE=$(RELEASE)
LDFLAGS = -lm -lSDL2
LDELDFLAGS =
OBJECTDIR = ../$(RELEASENAME)/
default : ../$(OSARCHNAME)/lde ../$(OSARCHNAME)/ldesdl

View File

@@ -1,27 +1,8 @@
# Options for Linux, Intel 386/486 and X-Window # Options for Linux, Intel 386/486 and X-Window
CC = gcc -m32 $(GCC_CFLAGS) GCC_CFLAGS := -m32 $(GCC_CFLAGS)
# CC = clang -m32 $(CLANG_CFLAGS) CLANG_CFLAGS := -m32 $(CLANG_CFLAGS)
USE_DISPLAY=x
USE_LIBBSD=T
XFILES = $(OBJECTDIR)xmkicon.o \ include linux-common.mk
$(OBJECTDIR)xbbt.o \
$(OBJECTDIR)dspif.o \
$(OBJECTDIR)xinit.o \
$(OBJECTDIR)xscroll.o \
$(OBJECTDIR)xcursor.o \
$(OBJECTDIR)xlspwin.o \
$(OBJECTDIR)xrdopt.o \
$(OBJECTDIR)xwinman.o
XFLAGS = -DXWINDOW
# OPTFLAGS is normally -O2.
OPTFLAGS = -O2 -g3
DFLAGS = $(XFLAGS) -DRELEASE=$(RELEASE)
LDFLAGS = -L/usr/X11/lib -lX11 -lc -lm
LDELDFLAGS = -L/usr/X11/lib -lX11 -lc -lm
OBJECTDIR = ../$(RELEASENAME)/
default : ../$(OSARCHNAME)/lde ../$(OSARCHNAME)/ldex

View File

@@ -1,25 +1,6 @@
# Options for Linux, ARM64 and SDL # Options for Linux, ARM64 and SDL
CC = gcc $(GCC_CFLAGS) USE_DISPLAY=sdl
#CC = clang $(CLANG_CFLAGS) USE_LIBBSD=T
XFILES = $(OBJECTDIR)sdl.o include linux-common.mk
#
# For SDL version 2
# -DSDL=2 in SDLFLAGS and -lSDL2 in LDFLAGS
# For SDL version 3
# -DSDL=3 in SDLFLAGS and -lSDL3 in LDFLAGS
#
SDLFLAGS = -DSDL=2
# OPTFLAGS is normally -O2.
OPTFLAGS = -O2 -g3
DFLAGS = $(SDLFLAGS) -DRELEASE=$(RELEASE)
LDFLAGS = -lSDL2 -lm
LDELDFLAGS =
OBJECTDIR = ../$(RELEASENAME)/
default : ../$(OSARCHNAME)/lde ../$(OSARCHNAME)/ldesdl

View File

@@ -1,27 +1,6 @@
# Options for Linux, aarch64 and X-Window # Options for Linux, aarch64 and X-Window
CC = gcc $(GCC_CFLAGS) USE_DISPLAY=x
#CC = clang $(CLANG_CFLAGS) USE_LIBBSD=T
XFILES = $(OBJECTDIR)xmkicon.o \ include linux-common.mk
$(OBJECTDIR)xbbt.o \
$(OBJECTDIR)dspif.o \
$(OBJECTDIR)xinit.o \
$(OBJECTDIR)xscroll.o \
$(OBJECTDIR)xcursor.o \
$(OBJECTDIR)xlspwin.o \
$(OBJECTDIR)xrdopt.o \
$(OBJECTDIR)xwinman.o
XFLAGS = -DXWINDOW
# OPTFLAGS is normally -O2.
OPTFLAGS = -O2 -g3
DFLAGS = $(XFLAGS) -DRELEASE=$(RELEASE)
LDFLAGS = -L/usr/X11/lib -lX11 -lc -lm
LDELDFLAGS = -L/usr/X11/lib -lX11 -lc -lm
OBJECTDIR = ../$(RELEASENAME)/
default : ../$(OSARCHNAME)/lde ../$(OSARCHNAME)/ldex

View File

@@ -1,25 +1,6 @@
# Options for Linux, ARMv7 and SDL # Options for Linux, ARMv7 and SDL
CC = gcc $(GCC_CFLAGS) USE_DISPLAY=sdl
#CC = clang $(CLANG_CFLAGS) USE_LIBBSD=T
XFILES = $(OBJECTDIR)sdl.o include linux-common.mk
#
# For SDL version 2
# -DSDL=2 in XFLAGS and -lSDL2 in LDFLAGS
# For SDL version 3
# -DSDL=3 in XFLAGS and -lSDL3 in LDFLAGS
#
XFLAGS = -DSDL=2
# OPTFLAGS is normally -O2.
OPTFLAGS = -O2 -g3
DFLAGS = $(XFLAGS) -DRELEASE=$(RELEASE)
LDFLAGS = -lm -lSDL2
LDELDFLAGS =
OBJECTDIR = ../$(RELEASENAME)/
default : ../$(OSARCHNAME)/lde ../$(OSARCHNAME)/ldesdl

View File

@@ -1,27 +1,6 @@
# Options for Linux, ARMv7 and X-Window # Options for Linux, ARMv7 and X-Window
CC = gcc $(GCC_CFLAGS) USE_DISPLAY=x
#CC = clang $(CLANG_CFLAGS) USE_LIBBSD=T
XFILES = $(OBJECTDIR)xmkicon.o \ include linux-common.mk
$(OBJECTDIR)xbbt.o \
$(OBJECTDIR)dspif.o \
$(OBJECTDIR)xinit.o \
$(OBJECTDIR)xscroll.o \
$(OBJECTDIR)xcursor.o \
$(OBJECTDIR)xlspwin.o \
$(OBJECTDIR)xrdopt.o \
$(OBJECTDIR)xwinman.o
XFLAGS = -DXWINDOW
# OPTFLAGS is normally -O2.
OPTFLAGS = -O2 -g3
DFLAGS = $(XFLAGS) -DRELEASE=$(RELEASE)
LDFLAGS = -L/usr/X11/lib -lX11 -lc -lm
LDELDFLAGS = -L/usr/X11/lib -lX11 -lc -lm
OBJECTDIR = ../$(RELEASENAME)/
default : ../$(OSARCHNAME)/lde ../$(OSARCHNAME)/ldex

View File

@@ -1,25 +1,8 @@
# Options for Linux, Intel x86_64 and SDL # Options for Linux, Intel x86_64 and SDL
CC = gcc -m64 $(GCC_CFLAGS) GCC_CFLAGS := -m64 $(GCC_CFLAGS)
# CC = clang -m64 $(CLANG_CFLAGS) CLANG_CFLAGS := -m64 $(CLANG_CFLAGS)
USE_DISPLAY=sdl
USE_LIBBSD=T
XFILES = $(OBJECTDIR)sdl.o include linux-common.mk
#
# For SDL version 2
# -DSDL=2 in XFLAGS and -lSDL2 in LDFLAGS
# For SDL version 3
# -DSDL=3 in XFLAGS and -lSDL3 in LDFLAGS
#
XFLAGS = -DSDL=2
# OPTFLAGS is normally -O2.
OPTFLAGS = -O2 -g3
DFLAGS = $(XFLAGS) -DRELEASE=$(RELEASE)
LDFLAGS = -lm -lSDL2
LDELDFLAGS =
OBJECTDIR = ../$(RELEASENAME)/
default : ../$(OSARCHNAME)/lde ../$(OSARCHNAME)/ldesdl

View File

@@ -1,28 +1,9 @@
# Options for Linux, Intel x86_64 and X-Window # Options for Linux, Intel x86_64 and X-Window
CC = gcc -m64 $(GCC_CFLAGS) GCC_CFLAGS := -m64 $(GCC_CFLAGS)
# CC = clang -m64 $(CLANG_CFLAGS) CLANG_CFLAGS := -m64 $(CLANG_CFLAGS)
USE_DISPLAY=x
USE_LIBBSD=T
XFILES = $(OBJECTDIR)xmkicon.o \ include linux-common.mk
$(OBJECTDIR)xbbt.o \
$(OBJECTDIR)dspif.o \
$(OBJECTDIR)xinit.o \
$(OBJECTDIR)xscroll.o \
$(OBJECTDIR)xcursor.o \
$(OBJECTDIR)xlspwin.o \
$(OBJECTDIR)xrdopt.o \
$(OBJECTDIR)xwinman.o
XFLAGS = -DXWINDOW
# OPTFLAGS is normally -O2.
OPTFLAGS = -O2 -g3
DFLAGS = $(XFLAGS) -DRELEASE=$(RELEASE)
LDFLAGS = -L/usr/X11/lib -lX11 -lc -lm
LDELDFLAGS = -L/usr/X11/lib -lX11 -lc -lm
OBJECTDIR = ../$(RELEASENAME)/
default : ../$(OSARCHNAME)/lde ../$(OSARCHNAME)/ldex

View File

@@ -1,25 +1,7 @@
# Options for Windows System for Linux v1, ARM64 and SDL # Options for Windows System for Linux v1, ARM64 and SDL
CC = gcc $(GCC_CFLAGS) USE_DISPLAY=sdl
#CC = clang $(CLANG_CFLAGS) USE_LIBBSD=T
ADDITIONAL_DFLAGS := -D__wsl1__
XFILES = $(OBJECTDIR)sdl.o include linux-common.mk
#
# For SDL version 2
# -DSDL=2 in SDLFLAGS and -lSDL2 in LDFLAGS
# For SDL version 3
# -DSDL=3 in SDLFLAGS and -lSDL3 in LDFLAGS
#
SDLFLAGS = -DSDL=2
# OPTFLAGS is normally -O2.
OPTFLAGS = -O2 -g3
DFLAGS = $(SDLFLAGS) -DRELEASE=$(RELEASE) -D__wsl1__
LDFLAGS = -lSDL2 -lm
LDELDFLAGS =
OBJECTDIR = ../$(RELEASENAME)/
default : ../$(OSARCHNAME)/lde ../$(OSARCHNAME)/ldesdl

View File

@@ -1,27 +1,7 @@
# Options for Windows System for Linux v1, aarch64 and X-Window # Options for Windows System for Linux v1, aarch64 and X-Window
CC = gcc $(GCC_CFLAGS) USE_DISPLAY=x
#CC = clang $(CLANG_CFLAGS) USE_LIBBSD=T
ADDITIONAL_DFLAGS := -D__wsl1__
XFILES = $(OBJECTDIR)xmkicon.o \ include linux-common.mk
$(OBJECTDIR)xbbt.o \
$(OBJECTDIR)dspif.o \
$(OBJECTDIR)xinit.o \
$(OBJECTDIR)xscroll.o \
$(OBJECTDIR)xcursor.o \
$(OBJECTDIR)xlspwin.o \
$(OBJECTDIR)xrdopt.o \
$(OBJECTDIR)xwinman.o
XFLAGS = -DXWINDOW
# OPTFLAGS is normally -O2.
OPTFLAGS = -O2 -g3
DFLAGS = $(XFLAGS) -DRELEASE=$(RELEASE) -D__wsl1__
LDFLAGS = -L/usr/X11/lib -lX11 -lc -lm
LDELDFLAGS = -L/usr/X11/lib -lX11 -lc -lm
OBJECTDIR = ../$(RELEASENAME)/
default : ../$(OSARCHNAME)/lde ../$(OSARCHNAME)/ldex

View File

@@ -1,25 +1,9 @@
# Options for Windows System for Linux v1, Intel x86_64 and SDL # Options for Windows System for Linux v1, Intel x86_64 and SDL
CC = gcc -m64 $(GCC_CFLAGS) GCC_CFLAGS := -m64 $(GCC_CFLAGS)
# CC = clang -m64 $(CLANG_CFLAGS) CLANG_CFLAGS := -m64 $(CLANG_CFLAGS)
USE_DISPLAY=sdl
USE_LIBBSD=T
ADDITIONAL_DFLAGS := -D__wsl1__
XFILES = $(OBJECTDIR)sdl.o include linux-common.mk
#
# For SDL version 2
# -DSDL=2 in XFLAGS and -lSDL2 in LDFLAGS
# For SDL version 3
# -DSDL=3 in XFLAGS and -lSDL3 in LDFLAGS
#
XFLAGS = -DSDL=2
# OPTFLAGS is normally -O2.
OPTFLAGS = -O2 -g3
DFLAGS = $(XFLAGS) -DRELEASE=$(RELEASE) -D__wsl1__
LDFLAGS = -lm -lSDL2
LDELDFLAGS =
OBJECTDIR = ../$(RELEASENAME)/
default : ../$(OSARCHNAME)/lde ../$(OSARCHNAME)/ldesdl

View File

@@ -1,28 +1,9 @@
# Options for Windows System for Linux v1, Intel x86_64 and X-Window # Options for Windows System for Linux v1, Intel x86_64 and X-Window
CC = gcc -m64 $(GCC_CFLAGS) GCC_CFLAGS := -m64 $(GCC_CFLAGS)
# CC = clang -m64 $(CLANG_CFLAGS) CLANG_CFLAGS := -m64 $(CLANG_CFLAGS)
USE_DISPLAY=x
USE_LIBBSD=T
ADDITIONAL_DFLAGS := -D__wsl1__
XFILES = $(OBJECTDIR)xmkicon.o \ include linux-common.mk
$(OBJECTDIR)xbbt.o \
$(OBJECTDIR)dspif.o \
$(OBJECTDIR)xinit.o \
$(OBJECTDIR)xscroll.o \
$(OBJECTDIR)xcursor.o \
$(OBJECTDIR)xlspwin.o \
$(OBJECTDIR)xrdopt.o \
$(OBJECTDIR)xwinman.o
XFLAGS = -DXWINDOW
# OPTFLAGS is normally -O2.
OPTFLAGS = -O2 -g3
DFLAGS = $(XFLAGS) -DRELEASE=$(RELEASE) -D__wsl1__
LDFLAGS = -L/usr/X11/lib -lX11 -lc -lm
LDELDFLAGS = -L/usr/X11/lib -lX11 -lc -lm
OBJECTDIR = ../$(RELEASENAME)/
default : ../$(OSARCHNAME)/lde ../$(OSARCHNAME)/ldex