-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: refactor to use autotools (still wip)
- Loading branch information
Showing
119 changed files
with
967 additions
and
186 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
SUBDIRS = lib sys srv |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/sh | ||
|
||
v=`git describe --abbrev=4 --match='v[0-9]*' HEAD 2>/dev/null` | ||
|
||
if [ ! -n "$v" ] | ||
then | ||
v="0.0" | ||
fi | ||
|
||
c=`git rev-parse --short HEAD` | ||
|
||
v="${v}-${c}" | ||
|
||
s=`git status` | ||
if [ -n "$s" ] | ||
then | ||
v="${v}-dirty" | ||
fi | ||
|
||
echo "$v" | tr -d '\012' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
ignore: | ||
- "**/tests" | ||
- "test" |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
-ansi | ||
-pedantic | ||
-pedantic-errors | ||
-Wall | ||
-Werror | ||
-Wextra | ||
-fno-builtin | ||
-Wno-variadic-macros | ||
-Dinline=__inline__ | ||
-Isrc/lib |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
m4_define([fukuro_VERSION], | ||
m4_esyscmd([build-aux/git-version])) | ||
AC_INIT([Fukuro], | ||
m4_defn([fukuro_VERSION]), | ||
[https://github.com/d0p1s4m4/Fukuro/issues]) | ||
AC_COPYRIGHT([Copyright (C) 2023 d0p1]) | ||
|
||
CFLAGS="-ffreestanding -nostdlib -fno-builtin" | ||
|
||
AC_CONFIG_AUX_DIR([build-aux]) | ||
|
||
AM_INIT_AUTOMAKE([foreign subdir-objects]) | ||
|
||
dnl overide default AC_LANG_PROGRAM(C) macro | ||
m4_ifdef([AC_LANG_PROGRAM(c)], m4_undefine[AC_LANG_PROGRAM(c)]) | ||
m4_define([AC_LANG_PROGRAM(C)], | ||
[$1 | ||
int | ||
_start (void) | ||
{ | ||
$2 | ||
; | ||
return 0; | ||
}]) | ||
|
||
AC_CANONICAL_HOST | ||
|
||
AS_CASE([$host_cpu], | ||
[i?86], [ | ||
systype=i686 | ||
], | ||
[x86_64], [systype=amd64], | ||
[systype=$host_cpu] | ||
) | ||
AC_SUBST([systype]) | ||
|
||
m4_include([sys/configfrag.ac]) | ||
|
||
AS_IF([! test -d "$srcdir/sys/$systype"], | ||
[AC_MSG_ERROR(["$host_cpu isn't supported by Fukuro"])]) | ||
|
||
AC_CONFIG_HEADERS([config.h]) | ||
AC_CONFIG_FILES([Makefile lib/Makefile srv/Makefile sys/Makefile]) | ||
|
||
AC_LANG([C]) | ||
save_cross_compiling=$cross_compiling | ||
cross_compiling=yes | ||
AM_PROG_AS | ||
cross_compiling=$save_cross_compiling | ||
AC_PROG_CC | ||
AC_PROG_CPP | ||
AC_PROG_RANLIB | ||
AC_PROG_LN_S | ||
AC_PROG_MKDIR_P | ||
AC_PROG_CC_C_O | ||
AM_PROG_AR | ||
|
||
AC_CHECK_TOOL([STRIP], [strip]) | ||
AC_CHECK_TOOL([OBJCOPY], [objcopy]) | ||
AC_CHECK_PROG([GZIP], [gzip], [gzip]) | ||
AC_CHECK_PROG([QEMU], [qemu-system-$host_cpu], [qemu-system-$host_cpu]) | ||
AC_CHECK_PROG([PYTHON3], [python3], [python3]) | ||
AC_CHECK_PROG([DOXYGEN], [doxygen], [doxygen]) | ||
|
||
AC_C_CONST | ||
AC_C_INLINE | ||
AC_C_VOLATILE | ||
AC_C_BIGENDIAN | ||
AC_CHECK_HEADERS([stdarg.h]) | ||
AC_C_STRINGIZE | ||
|
||
AC_CHECK_TYPE(uintptr_t) | ||
AC_TYPE_SIZE_T | ||
|
||
AC_CONFIG_LINKS(["sys/machine":"$srcdir/sys/$systype"]) | ||
|
||
AC_ARG_ENABLE([ncpus], | ||
AS_HELP_STRING([--enable-ncpus=N], []), | ||
[ncpu=$enable_ncpus] | ||
[ncpu=1]) | ||
AC_DEFINE_UNQUOTED([NCPUS], [$ncpus], [number of CPUs]) | ||
|
||
m4_include([srv/configfrag.ac]) | ||
|
||
AC_OUTPUT | ||
AC_MSG_RESULT([ | ||
Fukurō version: $PACKAGE_STRING | ||
Architecture: $host_cpu | ||
C Compiler: $CC | ||
Asm Compiler: $CCAS | ||
CFLAGS: $CFLAGS | ||
CCASFLAGS: $CCASFLAG | ||
LDFLAGS: $LDFLAGS | ||
]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# Credits | ||
|
||
Fukurō takes inspirations and/or reuse code from the following projects: | ||
|
||
## BRUTAL | ||
|
||
Striking modernist shapes and bold use of modern C are the hallmarks of BRUTAL. Inspired by brutalist design BRUTAL combines the ideals of UNIX from the 1970s with modern technology and engineering. | ||
|
||
URL: <https://github.com/brutal-org/brutal> | ||
|
||
``` | ||
MIT License | ||
Copyright (c) 2021-2022 The brutal operating system contributors | ||
``` | ||
|
||
## cute-engineewing | ||
|
||
A group of hackers who design minimalist software. | ||
|
||
URL: <https://github.com/cute-engineewing> | ||
|
||
``` | ||
BSD 3-Clause License | ||
Copyright (c) 2021, cute-engineewing | ||
Copyright (c) 2021, The µnix Contributors | ||
``` | ||
|
||
## Minix 3 | ||
|
||
Minix (from mini-Unix) is a Unix-like operating system. | ||
|
||
URL: <https://wiki.minix3.org> | ||
|
||
``` | ||
BSD 3-Clause License | ||
Copyright (c) 1987,1997,2001 Prentice Hall | ||
``` | ||
|
||
## Albert Hofmann | ||
|
||
The first known person to synthesize, ingest, and learn of the psychedelic effects of lysergic acid diethylamide (LSD). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Source layout | ||
|
||
- `docs/` Documentation | ||
- `make/` Makefiles helper | ||
- `aarch64/` | ||
- `arm/` | ||
- `x86/` | ||
- `32/` | ||
- `64/` | ||
- `src/` | ||
- `kernel/` | ||
- `arch/` | ||
- `aarch64/` | ||
- `arm/` | ||
- `x86/` | ||
- `32/` | ||
- `64/` | ||
- `lib/` | ||
- `minic/` | ||
- `fukuro/` | ||
- `server/` | ||
- `net/` | ||
- `rtl8139/` | ||
- `test/` | ||
- `thirdparty/` Sources code from external source | ||
- `tools/` Scripts used in order to build Fukurō |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.