2022-06-10 01:23:03 -04:00
|
|
|
include $(top_srcdir)/shared.am
|
2020-11-27 05:29:53 -05:00
|
|
|
|
2022-06-10 01:23:03 -04:00
|
|
|
ACLOCAL_AMFLAGS = -I m4
|
|
|
|
EXTRA_DIST = autogen.sh CONTRIBUTING.md sha256sums.txt
|
2022-06-03 14:57:17 -04:00
|
|
|
|
2022-06-10 01:23:03 -04:00
|
|
|
SUBDIRS = include
|
2022-06-07 01:35:14 -04:00
|
|
|
|
|
|
|
if WITH_LIBC
|
2022-06-14 13:01:39 -04:00
|
|
|
# FIXME: after "make clean" libc is not rebuiling
|
2022-06-10 01:23:03 -04:00
|
|
|
SUBDIRS += libc
|
2022-06-07 01:35:14 -04:00
|
|
|
endif
|
2022-06-03 13:39:59 -04:00
|
|
|
|
2022-06-10 01:23:03 -04:00
|
|
|
SUBDIRS += .
|
2022-06-05 21:28:30 -04:00
|
|
|
|
2022-06-10 01:23:03 -04:00
|
|
|
if ENABLE_TESTS
|
|
|
|
SUBDIRS += examples tests
|
|
|
|
endif
|
2022-06-03 15:19:18 -04:00
|
|
|
|
2022-06-12 07:23:39 -04:00
|
|
|
libc/libc.la:
|
|
|
|
$(MAKE) $(AM_MAKEFLAGS) -C $(top_builddir)/libc libc.la
|
|
|
|
|
2022-06-20 17:28:35 -04:00
|
|
|
AM_CFLAGS += -DKERNAUX_ACCESS_PRIVATE
|
2022-06-20 11:19:15 -04:00
|
|
|
|
2022-06-10 01:23:03 -04:00
|
|
|
lib_LTLIBRARIES = libkernaux.la
|
2022-06-03 15:19:18 -04:00
|
|
|
|
2022-06-23 06:43:53 -04:00
|
|
|
##################
|
|
|
|
# Required files #
|
|
|
|
##################
|
|
|
|
|
2022-06-10 01:23:03 -04:00
|
|
|
libkernaux_la_LIBADD =
|
2022-06-20 17:28:35 -04:00
|
|
|
libkernaux_la_SOURCES = \
|
|
|
|
src/assert.c \
|
|
|
|
src/libc.h \
|
2022-06-25 10:30:24 -04:00
|
|
|
src/generic/file.c \
|
2022-06-21 04:37:52 -04:00
|
|
|
src/generic/malloc.c \
|
2022-06-28 19:51:24 -04:00
|
|
|
src/generic/mutex.c
|
2020-11-27 11:04:15 -05:00
|
|
|
|
2022-06-23 06:43:53 -04:00
|
|
|
########
|
|
|
|
# libc #
|
|
|
|
########
|
|
|
|
|
|
|
|
if WITH_LIBC
|
|
|
|
libkernaux_la_LIBADD += libc/libc.la
|
|
|
|
endif
|
|
|
|
|
2022-06-24 01:42:46 -04:00
|
|
|
#######
|
|
|
|
# ARCH #
|
|
|
|
#######
|
|
|
|
|
|
|
|
if WITH_ARCH_I386
|
|
|
|
libkernaux_la_SOURCES += src/arch/i386.c
|
|
|
|
endif
|
|
|
|
|
2022-06-23 06:43:53 -04:00
|
|
|
#######
|
|
|
|
# ASM #
|
|
|
|
#######
|
|
|
|
|
2022-06-24 01:42:46 -04:00
|
|
|
if WITH_ASM
|
2021-12-20 01:14:40 -05:00
|
|
|
if ASM_I386
|
2022-06-10 01:23:03 -04:00
|
|
|
libkernaux_la_SOURCES += src/asm/i386.S
|
2020-11-29 22:29:58 -05:00
|
|
|
endif
|
2022-01-15 05:09:45 -05:00
|
|
|
if ASM_RISCV64
|
2022-06-10 01:23:03 -04:00
|
|
|
libkernaux_la_SOURCES += src/asm/riscv64.S
|
2022-01-15 05:09:45 -05:00
|
|
|
endif
|
2021-12-20 01:14:40 -05:00
|
|
|
if ASM_X86_64
|
2022-06-10 01:23:03 -04:00
|
|
|
libkernaux_la_SOURCES += src/asm/x86_64.S
|
2020-12-06 23:37:16 -05:00
|
|
|
endif
|
2022-06-24 01:42:46 -04:00
|
|
|
endif
|
2022-06-23 06:43:53 -04:00
|
|
|
|
|
|
|
####################
|
|
|
|
# Default packages #
|
|
|
|
####################
|
|
|
|
|
2021-12-17 20:27:45 -05:00
|
|
|
if WITH_CMDLINE
|
2022-06-10 01:23:03 -04:00
|
|
|
libkernaux_la_SOURCES += src/cmdline.c
|
2020-12-05 19:23:07 -05:00
|
|
|
endif
|
2021-12-17 20:27:45 -05:00
|
|
|
if WITH_ELF
|
2022-06-10 01:23:03 -04:00
|
|
|
libkernaux_la_SOURCES += src/elf.c
|
2022-01-17 07:33:28 -05:00
|
|
|
endif
|
2022-06-22 05:39:53 -04:00
|
|
|
if WITH_FREE_LIST
|
|
|
|
libkernaux_la_SOURCES += src/free_list.c
|
|
|
|
endif
|
2022-01-17 00:58:47 -05:00
|
|
|
if WITH_MBR
|
2022-06-10 01:23:03 -04:00
|
|
|
libkernaux_la_SOURCES += src/mbr.c
|
2022-01-17 07:33:28 -05:00
|
|
|
endif
|
2022-06-15 03:58:14 -04:00
|
|
|
if WITH_MEMMAP
|
|
|
|
libkernaux_la_SOURCES += src/memmap.c
|
|
|
|
endif
|
2021-12-17 20:27:45 -05:00
|
|
|
if WITH_MULTIBOOT2
|
2022-06-10 01:23:03 -04:00
|
|
|
libkernaux_la_SOURCES += \
|
2022-01-13 09:07:13 -05:00
|
|
|
src/multiboot2/enums_to_str.c \
|
2022-01-13 07:44:22 -05:00
|
|
|
src/multiboot2/header_helpers.c \
|
2022-01-13 08:50:51 -05:00
|
|
|
src/multiboot2/header_is_valid.c \
|
|
|
|
src/multiboot2/header_print.c \
|
2022-06-15 07:02:33 -04:00
|
|
|
src/multiboot2/info_convert.c \
|
2022-01-12 22:25:09 -05:00
|
|
|
src/multiboot2/info_helpers.c \
|
2022-01-12 22:10:33 -05:00
|
|
|
src/multiboot2/info_is_valid.c \
|
2022-01-12 22:12:28 -05:00
|
|
|
src/multiboot2/info_print.c
|
2020-12-05 19:23:07 -05:00
|
|
|
endif
|
2022-01-19 05:35:02 -05:00
|
|
|
if WITH_NTOA
|
2022-06-10 01:23:03 -04:00
|
|
|
libkernaux_la_SOURCES += src/ntoa.c
|
2022-01-19 05:35:02 -05:00
|
|
|
endif
|
2021-12-17 20:27:45 -05:00
|
|
|
if WITH_PFA
|
2022-06-10 01:23:03 -04:00
|
|
|
libkernaux_la_SOURCES += src/pfa.c
|
2022-01-17 07:33:28 -05:00
|
|
|
endif
|
2022-01-17 10:00:29 -05:00
|
|
|
if WITH_PRINTF
|
2022-06-10 01:23:03 -04:00
|
|
|
libkernaux_la_SOURCES += src/printf.c
|
2022-06-03 21:05:57 -04:00
|
|
|
endif
|
2022-06-03 15:13:51 -04:00
|
|
|
if WITH_PRINTF_FMT
|
2022-06-10 01:23:03 -04:00
|
|
|
libkernaux_la_SOURCES += src/printf_fmt.c
|
2022-06-03 15:13:51 -04:00
|
|
|
endif
|
|
|
|
if WITH_UNITS
|
2022-06-10 01:23:03 -04:00
|
|
|
libkernaux_la_SOURCES += src/units.c
|
2022-06-03 14:57:17 -04:00
|
|
|
endif
|
2022-06-23 22:10:59 -04:00
|
|
|
|
|
|
|
###########
|
|
|
|
# Drivers #
|
|
|
|
###########
|
|
|
|
|
|
|
|
if WITH_DRIVERS
|
|
|
|
libkernaux_la_SOURCES += \
|
|
|
|
src/drivers/console.c \
|
|
|
|
src/drivers/framebuffer.c
|
|
|
|
|
|
|
|
# Intel 8253-compatible programmable interval timer
|
|
|
|
|
|
|
|
if ASM_I386
|
|
|
|
libkernaux_la_SOURCES += src/drivers/intel_8253_pit.c
|
|
|
|
endif
|
|
|
|
|
|
|
|
# Intel 8259-compatible programmable interrupt controller
|
|
|
|
|
|
|
|
if ASM_I386
|
|
|
|
libkernaux_la_SOURCES += src/drivers/intel_8259_pic.c
|
|
|
|
endif
|
|
|
|
|
|
|
|
endif # WITH_DRIVERS
|