Subversion Repositories Kolibri OS

Rev

Rev 4103 | 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/interval_tree.c   \
  29.                 linux/firmware.c        \
  30.                 linux/hdmi.c            \
  31.                 linux/kasprintf.c       \
  32.                 linux/kref.c            \
  33.                 linux/list_sort.c       \
  34.                 linux/mutex.c           \
  35.                 linux/rbtree.c          \
  36.                 linux/dmapool.c         \
  37.                 linux/ctype.c           \
  38.                 linux/scatterlist.c     \
  39.                 linux/string.c          \
  40.                 linux/time.c            \
  41.                 linux/workqueue.c       \
  42.                 malloc/malloc.c         \
  43.                 stdio/vsprintf.c        \
  44.                 string/_memmove.S       \
  45.                 string/_strncat.S       \
  46.                 string/_strncmp.S       \
  47.                 string/_strncpy.S       \
  48.                 string/_strnlen.S       \
  49.                 string/bcmp.S           \
  50.                 string/bcopy.S          \
  51.                 string/bzero.S          \
  52.                 string/index.S          \
  53.                 string/memchr.S         \
  54.                 string/memcmp.S         \
  55.                 string/memcpy.S         \
  56.                 string/memmove.S        \
  57.                 string/memset.S         \
  58.                 string/rindex.S         \
  59.                 string/strcat.S         \
  60.                 string/strchr.S         \
  61.                 string/strcmp.S         \
  62.                 string/strcpy.S         \
  63.                 string/strlen.S         \
  64.                 string/strncat.S        \
  65.                 string/strncmp.S        \
  66.                 string/strncpy.S        \
  67.                 string/strnlen.S        \
  68.                 string/strrchr.S
  69.  
  70.  
  71.  
  72. NAME_OBJS =  $(patsubst %.S, %.o, $(patsubst %.asm, %.o,\
  73.              $(patsubst %.c, %.o, $(NAME_SRCS))))
  74.  
  75.  
  76. TARGET  = $(NAME).a
  77.  
  78. all: $(TARGET) libcore.a
  79.  
  80.  
  81. $(TARGET): $(NAME_OBJS) $(NAME_SRC) Makefile
  82.         $(AR) cvrs $@ $(NAME_OBJS)
  83.  
  84.  
  85. libcore.a: core.S Makefile
  86.         $(AS) -o core.o $<
  87.         $(LD) -shared -s --out-implib $@ --output-def core.def -o core.dll core.o
  88.        
  89. %.o: %.S Makefile
  90.         $(CC) $(CFLAGS) -o $@ $<
  91.  
  92. %.o: %.c Makefile ../include/*.h ../include/linux/*.h
  93.         $(CC) $(CFLAGS) -o $@ $<
  94.  
  95. clean:
  96.         -rm -f */*.o
  97.  
  98.  
  99.