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