1
0
Fork 0
mirror of https://github.com/tailix/libkernaux.git synced 2024-10-30 11:54:01 -04:00
libkernaux/Makefile.am

138 lines
2.4 KiB
Makefile
Raw Normal View History

include $(top_srcdir)/shared.am
2020-11-27 05:29:53 -05:00
ACLOCAL_AMFLAGS = -I m4
EXTRA_DIST = autogen.sh CONTRIBUTING.md sha256sums.txt
2022-06-03 14:57:17 -04:00
SUBDIRS = include
if WITH_LIBC
# FIXME: after "make clean" libc is not rebuiling
SUBDIRS += libc
endif
2022-06-03 13:39:59 -04:00
SUBDIRS += .
if ENABLE_TESTS
SUBDIRS += examples tests
endif
2022-06-03 15:19:18 -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
lib_LTLIBRARIES = libkernaux.la
2022-06-03 15:19:18 -04:00
##################
# Required files #
##################
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
########
# libc #
########
if WITH_LIBC
libkernaux_la_LIBADD += libc/libc.la
endif
#######
# ARCH #
#######
if WITH_ARCH_I386
libkernaux_la_SOURCES += src/arch/i386.c
endif
#######
# ASM #
#######
if WITH_ASM
if ASM_I386
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
libkernaux_la_SOURCES += src/asm/riscv64.S
2022-01-15 05:09:45 -05:00
endif
if ASM_X86_64
libkernaux_la_SOURCES += src/asm/x86_64.S
2020-12-06 23:37:16 -05:00
endif
endif
####################
# Default packages #
####################
if WITH_CMDLINE
libkernaux_la_SOURCES += src/cmdline.c
2020-12-05 19:23:07 -05:00
endif
if WITH_ELF
libkernaux_la_SOURCES += src/elf.c
2022-01-17 07:33:28 -05: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 07:33:28 -05:00
endif
2022-06-15 03:58:14 -04:00
if WITH_MEMMAP
libkernaux_la_SOURCES += src/memmap.c
endif
if WITH_MULTIBOOT2
libkernaux_la_SOURCES += \
src/multiboot2/enums_to_str.c \
src/multiboot2/header_helpers.c \
2022-01-13 08:50:51 -05:00
src/multiboot2/header_is_valid.c \
src/multiboot2/header_print.c \
src/multiboot2/info_convert.c \
2022-01-12 22:25:09 -05:00
src/multiboot2/info_helpers.c \
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
if WITH_NTOA
libkernaux_la_SOURCES += src/ntoa.c
endif
if WITH_PFA
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
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
libkernaux_la_SOURCES += src/printf_fmt.c
2022-06-03 15:13:51 -04:00
endif
if WITH_UNITS
libkernaux_la_SOURCES += src/units.c
2022-06-03 14:57:17 -04:00
endif
###########
# 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