libkernaux/Makefile.am

116 lines
2.0 KiB
Makefile
Raw Normal View History

2022-12-03 10:23:52 +00:00
include $(top_srcdir)/make/shared.am
include $(top_srcdir)/make/checks.am
2020-11-27 10:29:53 +00:00
ACLOCAL_AMFLAGS = -I m4
EXTRA_DIST = autogen.sh CONTRIBUTING.md sha256sums.txt
2022-06-03 18:57:17 +00:00
SUBDIRS = include
if WITH_LIBC
# FIXME: after "make clean" libc is not rebuiling
SUBDIRS += libc
endif
2022-06-03 17:39:59 +00:00
SUBDIRS += .
if ENABLE_CHECKS
SUBDIRS += examples tests
endif
2022-06-03 19:19:18 +00:00
libc/libc.la:
$(MAKE) $(AM_MAKEFLAGS) -C $(top_builddir)/libc libc.la
2022-06-20 21:28:35 +00:00
AM_CFLAGS += -DKERNAUX_ACCESS_PRIVATE
lib_LTLIBRARIES = libkernaux.la
2022-06-03 19:19:18 +00:00
##################
# Required files #
##################
2022-12-14 07:03:47 +00:00
libkernaux_la_LDFLAGS = -version-info @PACKAGE_VERSION_SO@
libkernaux_la_LIBADD =
2022-06-20 21:28:35 +00:00
libkernaux_la_SOURCES = \
src/assert.c \
src/generic/display.c \
2022-06-21 08:37:52 +00:00
src/generic/malloc.c \
2022-06-28 23:51:24 +00:00
src/generic/mutex.c
2020-11-27 16:04:15 +00:00
########
# libc #
########
if WITH_LIBC
libkernaux_la_LIBADD += libc/libc.la
endif
#######
# ARCH #
#######
if WITH_ARCH_I386
2022-12-08 23:46:31 +00:00
libkernaux_la_SOURCES += src/arch/i386/idt.c
endif
#######
# ASM #
#######
if WITH_ASM
if ASM_I386
libkernaux_la_SOURCES += src/asm/i386.S
2020-11-30 03:29:58 +00:00
endif
2022-01-15 10:09:45 +00:00
if ASM_RISCV64
libkernaux_la_SOURCES += src/asm/riscv64.S
2022-01-15 10:09:45 +00:00
endif
if ASM_X86_64
libkernaux_la_SOURCES += src/asm/x86_64.S
2020-12-07 04:37:16 +00:00
endif
endif
####################
# Default packages #
####################
if WITH_CMDLINE
libkernaux_la_SOURCES += src/cmdline.c
2020-12-06 00:23:07 +00:00
endif
if WITH_ELF
libkernaux_la_SOURCES += src/elf.c
2022-01-17 12:33:28 +00:00
endif
if WITH_FREE_LIST
libkernaux_la_SOURCES += src/free_list.c
endif
if WITH_MBR
libkernaux_la_SOURCES += src/mbr.c
2022-01-17 12:33:28 +00:00
endif
2022-06-15 07:58:14 +00:00
if WITH_MEMMAP
libkernaux_la_SOURCES += src/memmap.c
endif
if WITH_MULTIBOOT2
libkernaux_la_SOURCES += \
2022-12-17 02:31:09 +00:00
src/multiboot2/header_enums.c \
src/multiboot2/header_helpers.c \
2022-01-13 13:50:51 +00:00
src/multiboot2/header_is_valid.c \
src/multiboot2/header_print.c \
2022-12-17 02:31:09 +00:00
src/multiboot2/info_enums.c \
2022-01-13 03:25:09 +00:00
src/multiboot2/info_helpers.c \
src/multiboot2/info_is_valid.c \
2022-01-13 03:12:28 +00:00
src/multiboot2/info_print.c
2020-12-06 00:23:07 +00:00
endif
if WITH_NTOA
libkernaux_la_SOURCES += src/ntoa.c
endif
if WITH_PFA
libkernaux_la_SOURCES += src/pfa.c
2022-01-17 12:33:28 +00:00
endif
2022-01-17 15:00:29 +00:00
if WITH_PRINTF
libkernaux_la_SOURCES += src/printf.c
2022-06-04 01:05:57 +00:00
endif
2022-06-03 19:13:51 +00:00
if WITH_PRINTF_FMT
libkernaux_la_SOURCES += src/printf_fmt.c
2022-06-03 19:13:51 +00:00
endif
if WITH_UNITS
libkernaux_la_SOURCES += src/units.c
2022-06-03 18:57:17 +00:00
endif