Subversion Repositories Kolibri OS

Rev

Rev 3482 | Rev 5096 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1.  
  2.  
  3. CC = gcc
  4. AS = as
  5.  
  6. DRV_TOPDIR   = $(CURDIR)/..
  7. DRV_INCLUDES = $(DRV_TOPDIR)/include
  8.  
  9. INCLUDES =      -I$(DRV_INCLUDES) -I$(DRV_INCLUDES)/linux -I$(DRV_INCLUDES)/linux/asm
  10. DEFINES  =      -DKOLIBRI -D__KERNEL__ -DCONFIG_X86_32
  11. CFLAGS =        -c -Os $(INCLUDES) $(DEFINES) -march=i686 -fomit-frame-pointer -fno-builtin-printf \
  12. -mno-stack-arg-probe -mpreferred-stack-boundary=2 -mincoming-stack-boundary=2
  13.  
  14. NAME:=    libddk
  15.  
  16. CORE_SRC=       core.S
  17.  
  18.  
  19. NAME_SRCS:=                             \
  20.                 debug/dbglog.c          \
  21.                 debug/chkstk.S          \
  22.                 io/create.c             \
  23.                 io/finfo.c              \
  24.                 io/ssize.c              \
  25.                 io/write.c              \
  26.                 linux/bitmap.c          \
  27.                 linux/idr.c             \
  28.                 linux/firmware.c        \
  29.                 linux/kref.c            \
  30.                 linux/list_sort.c       \
  31.                 linux/rbtree.c          \
  32.                 linux/dmapool.c         \
  33.                 linux/ctype.c           \
  34.                 linux/string.c          \
  35.                 linux/time.c            \
  36.                 linux/workqueue.c       \
  37.                 malloc/malloc.c         \
  38.                 stdio/vsprintf.c        \
  39.                 string/_memmove.S       \
  40.                 string/_strncat.S       \
  41.                 string/_strncmp.S       \
  42.                 string/_strncpy.S       \
  43.                 string/_strnlen.S       \
  44.                 string/bcmp.S           \
  45.                 string/bcopy.S          \
  46.                 string/bzero.S          \
  47.                 string/index.S          \
  48.                 string/memchr.S         \
  49.                 string/memcmp.S         \
  50.                 string/memcpy.S         \
  51.                 string/memmove.S        \
  52.                 string/memset.S         \
  53.                 string/rindex.S         \
  54.                 string/strcat.S         \
  55.                 string/strchr.S         \
  56.                 string/strcmp.S         \
  57.                 string/strcpy.S         \
  58.                 string/strlen.S         \
  59.                 string/strncat.S        \
  60.                 string/strncmp.S        \
  61.                 string/strncpy.S        \
  62.                 string/strnlen.S        \
  63.                 string/strrchr.S
  64.  
  65.  
  66.  
  67. NAME_OBJS =  $(patsubst %.S, %.o, $(patsubst %.asm, %.o,\
  68.              $(patsubst %.c, %.o, $(NAME_SRCS))))
  69.  
  70.  
  71. TARGET  = $(NAME).a
  72.  
  73. all: $(TARGET) libcore.a
  74.  
  75.  
  76. $(TARGET): $(NAME_OBJS) $(NAME_SRC) Makefile
  77.         $(AR) cvrs $@ $(NAME_OBJS)
  78.  
  79.  
  80. libcore.a: core.S Makefile
  81.         $(AS) -o core.o $<
  82.         $(LD) -shared -s --out-implib $@ --output-def core.def -o core.dll core.o
  83.        
  84. %.o: %.S Makefile
  85.         $(CC) $(CFLAGS) -o $@ $<
  86.  
  87. %.o: %.c Makefile ../include/*.h ../include/linux/*.h
  88.         $(CC) $(CFLAGS) -o $@ $<
  89.  
  90. clean:
  91.         -rm -f */*.o
  92.  
  93.  
  94.