2010-02-12 21:11:35 +01:00
|
|
|
|
|
|
|
CC = gcc
|
|
|
|
AS = as
|
|
|
|
|
|
|
|
DRV_TOPDIR = $(CURDIR)/..
|
|
|
|
DRV_INCLUDES = $(DRV_TOPDIR)/include
|
|
|
|
|
2014-12-27 16:42:08 +01: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 20:23:56 +01:00
|
|
|
DEFINES+= -DCONFIG_PRINTK
|
2014-12-27 16:42:08 +01:00
|
|
|
|
2013-04-26 13:01:23 +02:00
|
|
|
CFLAGS = -c -Os $(INCLUDES) $(DEFINES) -march=i686 -fomit-frame-pointer -fno-builtin-printf \
|
2016-01-20 05:19:53 +01:00
|
|
|
-mno-stack-arg-probe -mpreferred-stack-boundary=2 -mincoming-stack-boundary=2 -fno-ident
|
2010-02-12 21:11:35 +01:00
|
|
|
|
2010-09-13 22:07:22 +02:00
|
|
|
NAME:= libddk
|
2010-02-12 21:11:35 +01:00
|
|
|
|
|
|
|
CORE_SRC= core.S
|
|
|
|
|
|
|
|
|
|
|
|
NAME_SRCS:= \
|
|
|
|
debug/dbglog.c \
|
2011-02-17 12:21:25 +01:00
|
|
|
debug/chkstk.S \
|
2016-02-27 21:06:12 +01:00
|
|
|
dma/dma_alloc.c \
|
|
|
|
dma/fence.c \
|
2010-02-12 21:11:35 +01:00
|
|
|
io/create.c \
|
|
|
|
io/finfo.c \
|
|
|
|
io/ssize.c \
|
|
|
|
io/write.c \
|
2013-03-19 07:14:59 +01:00
|
|
|
linux/bitmap.c \
|
2016-01-27 06:30:28 +01:00
|
|
|
linux/ctype.c \
|
2016-10-12 00:54:59 +02:00
|
|
|
linux/div64.c \
|
2016-01-27 06:30:28 +01:00
|
|
|
linux/dmapool.c \
|
2014-09-09 20:23:18 +02:00
|
|
|
linux/dmi.c \
|
2016-02-27 21:06:12 +01:00
|
|
|
linux/fbsysfs.c \
|
2014-12-27 16:42:08 +01:00
|
|
|
linux/find_next_bit.c \
|
2010-02-13 22:28:53 +01:00
|
|
|
linux/firmware.c \
|
2016-01-27 06:30:28 +01:00
|
|
|
linux/gcd.c \
|
2014-08-23 12:29:27 +02:00
|
|
|
linux/hdmi.c \
|
2016-01-27 06:30:28 +01:00
|
|
|
linux/hexdump.c \
|
|
|
|
linux/idr.c \
|
|
|
|
linux/interval_tree.c \
|
2014-08-23 12:29:27 +02:00
|
|
|
linux/kasprintf.c \
|
2016-03-13 07:45:57 +01:00
|
|
|
linux/kmap.c \
|
2010-02-13 22:28:53 +01:00
|
|
|
linux/list_sort.c \
|
2014-08-23 12:29:27 +02:00
|
|
|
linux/mutex.c \
|
2013-10-26 15:31:36 +02:00
|
|
|
linux/rbtree.c \
|
2014-08-23 12:29:27 +02:00
|
|
|
linux/scatterlist.c \
|
2011-06-24 14:27:43 +02:00
|
|
|
linux/string.c \
|
2012-11-12 22:22:52 +01:00
|
|
|
linux/time.c \
|
2013-04-26 13:01:23 +02:00
|
|
|
linux/workqueue.c \
|
2010-02-12 21:11:35 +01:00
|
|
|
malloc/malloc.c \
|
|
|
|
stdio/vsprintf.c \
|
2016-01-27 06:30:28 +01:00
|
|
|
string/strstr.c \
|
2010-09-27 00:57:18 +02: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 21:11:35 +01: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 00:57:18 +02:00
|
|
|
$(CC) $(CFLAGS) -o $@ $<
|
2010-02-12 21:11:35 +01:00
|
|
|
|
2011-06-24 15:52:10 +02:00
|
|
|
%.o: %.c Makefile ../include/*.h ../include/linux/*.h
|
2010-02-12 21:11:35 +01:00
|
|
|
$(CC) $(CFLAGS) -o $@ $<
|
|
|
|
|
2011-06-24 17:16:16 +02:00
|
|
|
clean:
|
|
|
|
-rm -f */*.o
|
|
|
|
|
|
|
|
|