2010-02-12 23:11:35 +03:00
|
|
|
|
|
|
|
CC = gcc
|
|
|
|
AS = as
|
|
|
|
|
|
|
|
DRV_TOPDIR = $(CURDIR)/..
|
|
|
|
DRV_INCLUDES = $(DRV_TOPDIR)/include
|
|
|
|
|
|
|
|
INCLUDES = -I$(DRV_INCLUDES) -I$(DRV_INCLUDES)/linux -I$(DRV_INCLUDES)/linux/asm
|
|
|
|
DEFINES = -DKOLIBRI -D__KERNEL__ -DCONFIG_X86_32
|
2011-06-24 19:16:16 +04:00
|
|
|
CFLAGS = -c -Os $(INCLUDES) $(DEFINES) -march=i586 -fomit-frame-pointer -fno-builtin-printf \
|
2011-02-17 19:15:11 +03:00
|
|
|
-mno-stack-arg-probe -mpreferred-stack-boundary=2 -mincoming-stack-boundary=2
|
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 \
|
2010-02-12 23:11:35 +03:00
|
|
|
io/create.c \
|
|
|
|
io/finfo.c \
|
|
|
|
io/ssize.c \
|
|
|
|
io/write.c \
|
2010-02-14 00:28:53 +03:00
|
|
|
linux/idr.c \
|
|
|
|
linux/firmware.c \
|
2012-09-05 01:40:09 +04:00
|
|
|
linux/kref.c \
|
2010-02-14 00:28:53 +03:00
|
|
|
linux/list_sort.c \
|
2010-09-14 00:07:22 +04:00
|
|
|
linux/dmapool.c \
|
2011-02-16 11:50:52 +03:00
|
|
|
linux/ctype.c \
|
2011-06-24 16:27:43 +04:00
|
|
|
linux/string.c \
|
2012-11-13 01:22:52 +04:00
|
|
|
linux/time.c \
|
2010-02-12 23:11:35 +03:00
|
|
|
malloc/malloc.c \
|
|
|
|
stdio/vsprintf.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
|
|
|
|
|
|
|
|
|