mirror of
https://github.com/limine-bootloader/limine
synced 2024-12-23 22:36:48 +03:00
build: Use config.h for generated constants
This commit is contained in:
parent
34f075516d
commit
1984f401a1
1
.gitignore
vendored
1
.gitignore
vendored
@ -31,6 +31,7 @@
|
||||
/config.log
|
||||
/autom4te.cache
|
||||
/GNUmakefile
|
||||
/common/config.h
|
||||
/common-bios
|
||||
/common-uefi32
|
||||
/common-uefi64
|
||||
|
@ -71,12 +71,6 @@ export LIMINE_READELF
|
||||
override USING_CLANG := @USING_CLANG@
|
||||
export USING_CLANG
|
||||
|
||||
override LIMINE_VERSION := @PACKAGE_VERSION@
|
||||
export LIMINE_VERSION
|
||||
|
||||
override LIMINE_COPYRIGHT := $(shell $(GREP) Copyright '$(call SHESCAPE,$(SRCDIR))/LICENSE.md')
|
||||
export LIMINE_COPYRIGHT
|
||||
|
||||
override STAGE1_FILES := $(shell find '$(call SHESCAPE,$(SRCDIR))/stage1' -type f -name '*.asm')
|
||||
|
||||
.PHONY: all
|
||||
|
@ -60,8 +60,6 @@ override INTERNAL_CFLAGS := \
|
||||
-mno-sse \
|
||||
-mno-sse2 \
|
||||
-MMD \
|
||||
-DLIMINE_VERSION='"$(LIMINE_VERSION)"' \
|
||||
-DLIMINE_COPYRIGHT='"$(LIMINE_COPYRIGHT)"' \
|
||||
-DCOM_OUTPUT=$(COM_OUTPUT) \
|
||||
-DE9_OUTPUT=$(E9_OUTPUT) \
|
||||
-I../freestanding_headers \
|
||||
|
7
common/config.h.in
Normal file
7
common/config.h.in
Normal file
@ -0,0 +1,7 @@
|
||||
#ifndef __CONFIG_H__
|
||||
#define __CONFIG_H__
|
||||
|
||||
#define LIMINE_VERSION "@PACKAGE_VERSION@"
|
||||
#define LIMINE_COPYRIGHT "@LIMINE_COPYRIGHT@"
|
||||
|
||||
#endif
|
@ -1,5 +1,6 @@
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
#include <config.h>
|
||||
#include <console.h>
|
||||
#include <menu.h>
|
||||
#include <mm/pmm.h>
|
||||
|
@ -2,6 +2,7 @@
|
||||
#include <stddef.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdnoreturn.h>
|
||||
#include <config.h>
|
||||
#include <menu.h>
|
||||
#include <lib/print.h>
|
||||
#include <lib/blib.h>
|
||||
|
@ -1,6 +1,7 @@
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include <stdnoreturn.h>
|
||||
#include <config.h>
|
||||
#include <protos/multiboot1.h>
|
||||
#include <lib/libc.h>
|
||||
#include <lib/elf.h>
|
||||
|
@ -1,6 +1,7 @@
|
||||
#include <protos/multiboot2.h>
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include <config.h>
|
||||
#include <lib/libc.h>
|
||||
#include <lib/elf.h>
|
||||
#include <lib/blib.h>
|
||||
|
@ -1,6 +1,7 @@
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include <stdbool.h>
|
||||
#include <config.h>
|
||||
#include <protos/stivale.h>
|
||||
#include <protos/stivale2.h>
|
||||
#include <lib/elf.h>
|
||||
|
@ -232,7 +232,10 @@ test "x$LIMINE_CFLAGS" = "x" && LIMINE_CFLAGS='-O3 -pipe -Wall -Wextra'
|
||||
AC_ARG_VAR(LIMINE_LDFLAGS, [Linker flags for Limine [default: ]])
|
||||
test "x$LIMINE_LDFLAGS" = "x" && LIMINE_LDFLAGS=' '
|
||||
|
||||
LIMINE_COPYRIGHT=$($GREP Copyright "$SRCDIR/LICENSE.md")
|
||||
AC_SUBST(LIMINE_COPYRIGHT, [$LIMINE_COPYRIGHT])
|
||||
|
||||
AC_PREFIX_DEFAULT(/usr/local)
|
||||
|
||||
AC_CONFIG_FILES(GNUmakefile)
|
||||
AC_CONFIG_FILES(GNUmakefile common/config.h)
|
||||
AC_OUTPUT
|
||||
|
Loading…
Reference in New Issue
Block a user