mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 18:58:54 +01:00
internal/cglfw: refactoring: split build.go into each platform
This commit is contained in:
parent
5f2c02eb1a
commit
3d41e8171e
@ -1,40 +0,0 @@
|
||||
// SPDX-License-Identifier: BSD-3-Clause
|
||||
// SPDX-FileCopyrightText: 2012 The glfw3-go Authors
|
||||
// SPDX-FileCopyrightText: 2023 The Ebitengine Authors
|
||||
|
||||
//go:build darwin || freebsd || linux || netbsd || openbsd
|
||||
|
||||
package cglfw
|
||||
|
||||
/*
|
||||
// Darwin Build Tags
|
||||
// ----------------
|
||||
// GLFW Options:
|
||||
#cgo darwin CFLAGS: -D_GLFW_COCOA -Wno-deprecated-declarations
|
||||
|
||||
// Linker Options:
|
||||
#cgo darwin LDFLAGS: -framework Cocoa -framework IOKit -framework CoreVideo
|
||||
|
||||
// Linux Build Tags
|
||||
// ----------------
|
||||
// GLFW Options:
|
||||
#cgo linux,!wayland CFLAGS: -D_GLFW_X11
|
||||
#cgo linux,wayland CFLAGS: -D_GLFW_WAYLAND
|
||||
|
||||
// Linker Options:
|
||||
#cgo linux,!wayland LDFLAGS: -lX11 -lXrandr -lXxf86vm -lXi -lXcursor -lm -lXinerama -ldl -lrt
|
||||
#cgo linux,wayland LDFLAGS: -lwayland-client -lwayland-cursor -lwayland-egl -lxkbcommon -lm -ldl -lrt
|
||||
|
||||
// BSD Build Tags
|
||||
// ----------------
|
||||
// GLFW Options:
|
||||
#cgo freebsd,!wayland netbsd,!wayland openbsd pkg-config: x11 xau xcb xdmcp
|
||||
#cgo freebsd,wayland netbsd,wayland pkg-config: wayland-client wayland-cursor wayland-egl epoll-shim
|
||||
#cgo freebsd netbsd openbsd CFLAGS: -D_GLFW_HAS_DLOPEN
|
||||
#cgo freebsd,!wayland netbsd,!wayland openbsd CFLAGS: -D_GLFW_X11 -D_GLFW_HAS_GLXGETPROCADDRESSARB
|
||||
#cgo freebsd,wayland netbsd,wayland CFLAGS: -D_GLFW_WAYLAND
|
||||
|
||||
// Linker Options:
|
||||
#cgo freebsd netbsd openbsd LDFLAGS: -lm
|
||||
*/
|
||||
import "C"
|
17
internal/cglfw/build_bsd.go
Normal file
17
internal/cglfw/build_bsd.go
Normal file
@ -0,0 +1,17 @@
|
||||
// SPDX-License-Identifier: BSD-3-Clause
|
||||
// SPDX-FileCopyrightText: 2012 The glfw3-go Authors
|
||||
// SPDX-FileCopyrightText: 2023 The Ebitengine Authors
|
||||
|
||||
//go:build freebsd || netbsd || openbsd
|
||||
|
||||
package cglfw
|
||||
|
||||
import "C"
|
||||
|
||||
// #cgo !wayland openbsd pkg-config: x11 xau xcb xdmcp
|
||||
// #cgo wayland,!openbsd pkg-config: wayland-client wayland-cursor wayland-egl epoll-shim
|
||||
// #cgo CFLAGS: -D_GLFW_HAS_DLOPEN
|
||||
// #cgo !wayland openbsd CFLAGS: -D_GLFW_X11 -D_GLFW_HAS_GLXGETPROCADDRESSARB
|
||||
// #cgo wayland,!openbsd CFLAGS: -D_GLFW_WAYLAND
|
||||
// #cgo LDFLAGS: -lm
|
||||
import "C"
|
9
internal/cglfw/build_darwin.go
Normal file
9
internal/cglfw/build_darwin.go
Normal file
@ -0,0 +1,9 @@
|
||||
// SPDX-License-Identifier: BSD-3-Clause
|
||||
// SPDX-FileCopyrightText: 2012 The glfw3-go Authors
|
||||
// SPDX-FileCopyrightText: 2023 The Ebitengine Authors
|
||||
|
||||
package cglfw
|
||||
|
||||
// #cgo CFLAGS: -D_GLFW_COCOA -Wno-deprecated-declarations
|
||||
// #cgo LDFLAGS: -framework Cocoa -framework IOKit -framework CoreVideo
|
||||
import "C"
|
11
internal/cglfw/build_linux.go
Normal file
11
internal/cglfw/build_linux.go
Normal file
@ -0,0 +1,11 @@
|
||||
// SPDX-License-Identifier: BSD-3-Clause
|
||||
// SPDX-FileCopyrightText: 2012 The glfw3-go Authors
|
||||
// SPDX-FileCopyrightText: 2023 The Ebitengine Authors
|
||||
|
||||
package cglfw
|
||||
|
||||
// #cgo !wayland CFLAGS: -D_GLFW_X11
|
||||
// #cgo wayland CFLAGS: -D_GLFW_WAYLAND
|
||||
// #cgo !wayland LDFLAGS: -lX11 -lXrandr -lXxf86vm -lXi -lXcursor -lm -lXinerama -ldl -lrt
|
||||
// #cgo wayland LDFLAGS: -lwayland-client -lwayland-cursor -lwayland-egl -lxkbcommon -lm -ldl -lrt
|
||||
import "C"
|
Loading…
Reference in New Issue
Block a user