1
0
Fork 0
mirror of https://github.com/tailix/libkernaux.git synced 2024-11-27 11:14:42 -05:00

Add architecture "x86_64"

This commit is contained in:
Alex Kotov 2020-12-07 09:37:16 +05:00
parent 3b8e6bf4b7
commit b0a0dcfb8b
Signed by: kotovalexarian
GPG key ID: 553C0EBBEB5D5F08
5 changed files with 20 additions and 0 deletions

View file

@ -25,6 +25,10 @@ if ARCH_X86
libkernaux_a_SOURCES += src/arch/x86.S
endif
if ARCH_X86_64
libkernaux_a_SOURCES += src/arch/x86_64.S
endif
if ENABLE_CMDLINE
libkernaux_a_SOURCES += src/cmdline.c
TESTS += \

View file

@ -16,12 +16,14 @@ AC_ARG_ENABLE([multiboot2], AS_HELP_STRING([--disable-multiboot2], [disable Mult
AC_ARG_ENABLE([pfa], AS_HELP_STRING([--disable-pfa], [disable Page Frame Allocator]))
AM_CONDITIONAL([ARCH_X86], [test "$host_cpu" = x86])
AM_CONDITIONAL([ARCH_X86_64], [test "$host_cpu" = x86_64])
AM_CONDITIONAL([ENABLE_CMDLINE], [test "$enable_cmdline" != no])
AM_CONDITIONAL([ENABLE_CONSOLE], [test "$enable_console" != no])
AM_CONDITIONAL([ENABLE_MULTIBOOT2], [test "$enable_multiboot2" != no])
AM_CONDITIONAL([ENABLE_PFA], [test "$enable_pfa" != no])
AS_IF([test "$host_cpu" = x86], [AC_DEFINE([ARCH_X86], [1], [architecture is x86])])
AS_IF([test "$host_cpu" = x86_64], [AC_DEFINE([ARCH_X86_64], [1], [architecture is x86_64])])
AS_IF([test "$enable_cmdline" != no], [AC_DEFINE([ENABLE_CMDLINE], [1], [enabled command line parser])])
AS_IF([test "$enable_console" != no], [AC_DEFINE([ENABLE_CONSOLE], [1], [enabled serial console])])
AS_IF([test "$enable_multiboot2" != no], [AC_DEFINE([ENABLE_MULTIBOOT2], [1], [enabled Multiboot 2 information parser])])

View file

@ -1,5 +1,6 @@
nobase_include_HEADERS = \
kernaux/arch/x86.h \
kernaux/arch/x86_64.h \
kernaux/cmdline.h \
kernaux/console.h \
kernaux/multiboot2.h \

View file

@ -0,0 +1,12 @@
#ifndef KERNAUX_INCLUDED_ARCH_X86_64
#define KERNAUX_INCLUDED_ARCH_X86_64 1
#ifdef __cplusplus
extern "C" {
#endif
#ifdef __cplusplus
}
#endif
#endif

1
src/arch/x86_64.S Normal file
View file

@ -0,0 +1 @@
#include "../config.h"