2010-02-12 23:11:35 +03:00
|
|
|
|
2021-07-13 01:49:51 +03:00
|
|
|
CC = kos32-gcc
|
|
|
|
AS = kos32-as
|
|
|
|
LD = kos32-ld
|
2010-02-12 23:11:35 +03:00
|
|
|
|
|
|
|
DRV_TOPDIR = $(CURDIR)/..
|
|
|
|
DRV_INCLUDES = $(DRV_TOPDIR)/include
|
|
|
|
|
2014-12-27 18:42:08 +03:00
|
|
|
|
|
|
|
INCLUDES = -I$(DRV_INCLUDES) \
|
|
|
|
-I$(DRV_INCLUDES)/asm \
|
|
|
|
-I$(DRV_INCLUDES)/uapi
|
|
|
|
|
|
|
|
DEFINES = -DKOLIBRI -D__KERNEL__ -DCONFIG_X86_32 -DCONFIG_DMI -DCONFIG_TINY_RCU
|
|
|
|
DEFINES+= -DCONFIG_X86_L1_CACHE_SHIFT=6 -DCONFIG_ARCH_HAS_CACHE_LINE_SIZE
|
2016-02-26 22:23:56 +03:00
|
|
|
DEFINES+= -DCONFIG_PRINTK
|
2014-12-27 18:42:08 +03:00
|
|
|
|
2013-04-26 15:01:23 +04:00
|
|
|
CFLAGS = -c -Os $(INCLUDES) $(DEFINES) -march=i686 -fomit-frame-pointer -fno-builtin-printf \
|
2016-01-20 07:19:53 +03:00
|
|
|
-mno-stack-arg-probe -mpreferred-stack-boundary=2 -mincoming-stack-boundary=2 -fno-ident
|
2010-02-12 23:11:35 +03:00
|
|
|
|
2010-09-14 00:07:22 +04:00
|
|
|
NAME:= libddk
|
2010-02-12 23:11:35 +03:00
|
|
|
|
|
|
|
CORE_SRC= core.S
|
|
|
|
|
|
|
|
|
|
|
|
NAME_SRCS:= \
|
|
|
|
debug/dbglog.c \
|
2011-02-17 14:21:25 +03:00
|
|
|
debug/chkstk.S \
|
2016-02-27 23:06:12 +03:00
|
|
|
dma/dma_alloc.c \
|
|
|
|
dma/fence.c \
|
2010-02-12 23:11:35 +03:00
|
|
|
io/create.c \
|
|
|
|
io/finfo.c \
|
|
|
|
io/ssize.c \
|
|
|
|
io/write.c \
|
2013-03-19 10:14:59 +04:00
|
|
|
linux/bitmap.c \
|
2016-01-27 08:30:28 +03:00
|
|
|
linux/ctype.c \
|
2016-10-12 01:54:59 +03:00
|
|
|
linux/div64.c \
|
2016-01-27 08:30:28 +03:00
|
|
|
linux/dmapool.c \
|
2014-09-09 22:23:18 +04:00
|
|
|
linux/dmi.c \
|
2016-02-27 23:06:12 +03:00
|
|
|
linux/fbsysfs.c \
|
2014-12-27 18:42:08 +03:00
|
|
|
linux/find_next_bit.c \
|
2010-02-14 00:28:53 +03:00
|
|
|
linux/firmware.c \
|
2016-01-27 08:30:28 +03:00
|
|
|
linux/gcd.c \
|
2014-08-23 14:29:27 +04:00
|
|
|
linux/hdmi.c \
|
2016-01-27 08:30:28 +03:00
|
|
|
linux/hexdump.c \
|
|
|
|
linux/idr.c \
|
|
|
|
linux/interval_tree.c \
|
2014-08-23 14:29:27 +04:00
|
|
|
linux/kasprintf.c \
|
2016-03-13 09:45:57 +03:00
|
|
|
linux/kmap.c \
|
2010-02-14 00:28:53 +03:00
|
|
|
linux/list_sort.c \
|
2014-08-23 14:29:27 +04:00
|
|
|
linux/mutex.c \
|
2013-10-26 17:31:36 +04:00
|
|
|
linux/rbtree.c \
|
2014-08-23 14:29:27 +04:00
|
|
|
linux/scatterlist.c \
|
2011-06-24 16:27:43 +04:00
|
|
|
linux/string.c \
|
2012-11-13 01:22:52 +04:00
|
|
|
linux/time.c \
|
2013-04-26 15:01:23 +04:00
|
|
|
linux/workqueue.c \
|
2023-12-28 17:06:06 +03:00
|
|
|
linux/msr.c \
|
2010-02-12 23:11:35 +03:00
|
|
|
malloc/malloc.c \
|
|
|
|
stdio/vsprintf.c \
|
2016-01-27 08:30:28 +03:00
|
|
|
string/strstr.c \
|
2010-09-27 02:57:18 +04:00
|
|
|
string/_memmove.S \
|
|
|
|
string/_strncat.S \
|
|
|
|
string/_strncmp.S \
|
|
|
|
string/_strncpy.S \
|
|
|
|
string/_strnlen.S \
|
|
|
|
string/bcmp.S \
|
|
|
|
string/bcopy.S \
|
|
|
|
string/bzero.S \
|
|
|
|
string/index.S \
|
|
|
|
string/memchr.S \
|
|
|
|
string/memcmp.S \
|
|
|
|
string/memcpy.S \
|
|
|
|
string/memmove.S \
|
|
|
|
string/memset.S \
|
|
|
|
string/rindex.S \
|
|
|
|
string/strcat.S \
|
|
|
|
string/strchr.S \
|
|
|
|
string/strcmp.S \
|
|
|
|
string/strcpy.S \
|
|
|
|
string/strlen.S \
|
|
|
|
string/strncat.S \
|
|
|
|
string/strncmp.S \
|
|
|
|
string/strncpy.S \
|
|
|
|
string/strnlen.S \
|
|
|
|
string/strrchr.S
|
2010-02-12 23:11:35 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
NAME_OBJS = $(patsubst %.S, %.o, $(patsubst %.asm, %.o,\
|
|
|
|
$(patsubst %.c, %.o, $(NAME_SRCS))))
|
|
|
|
|
|
|
|
|
|
|
|
TARGET = $(NAME).a
|
|
|
|
|
|
|
|
all: $(TARGET) libcore.a
|
|
|
|
|
|
|
|
|
|
|
|
$(TARGET): $(NAME_OBJS) $(NAME_SRC) Makefile
|
|
|
|
$(AR) cvrs $@ $(NAME_OBJS)
|
|
|
|
|
|
|
|
|
|
|
|
libcore.a: core.S Makefile
|
|
|
|
$(AS) -o core.o $<
|
|
|
|
$(LD) -shared -s --out-implib $@ --output-def core.def -o core.dll core.o
|
|
|
|
|
|
|
|
%.o: %.S Makefile
|
2010-09-27 02:57:18 +04:00
|
|
|
$(CC) $(CFLAGS) -o $@ $<
|
2010-02-12 23:11:35 +03:00
|
|
|
|
2011-06-24 17:52:10 +04:00
|
|
|
%.o: %.c Makefile ../include/*.h ../include/linux/*.h
|
2010-02-12 23:11:35 +03:00
|
|
|
$(CC) $(CFLAGS) -o $@ $<
|
|
|
|
|
2011-06-24 19:16:16 +04:00
|
|
|
clean:
|
|
|
|
-rm -f */*.o
|
|
|
|
|
|
|
|
|