Subversion Repositories Kolibri OS

Rev

Rev 1600 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1.  
  2. CC = gcc
  3. CFLAGS = -c -O2 -fomit-frame-pointer -fno-builtin-printf
  4. LDFLAGS = -nostdlib -shared -s -Map usb.map --image-base 0\
  5.           --file-alignment 512 --section-alignment 4096
  6.  
  7. DEFINES  = -D__KERNEL__ -DCONFIG_X86_32
  8.  
  9. DRV_TOPDIR   = $(CURDIR)/../..
  10.  
  11. DRV_INCLUDES = $(DRV_TOPDIR)/include
  12.  
  13. INCLUDES =      -I$(DRV_INCLUDES) \
  14.                 -I$(DRV_INCLUDES)/linux
  15.  
  16. LIBPATH = $(DRV_TOPDIR)/ddk
  17.  
  18.  
  19.  
  20. SRC_DEP:=    pci.inc            \
  21.              detect.inc         \
  22.              hcd.inc            \
  23.              hid.inc
  24.  
  25. USB_SRC:=    usb.c    
  26.  
  27. USB_OBJ:=    usb.obj
  28.  
  29. LIBS:=    -lddk -lcore
  30.  
  31. USB =        usb.dll
  32.  
  33. all: $(USB)
  34.  
  35. $(USB): $(USB_OBJ) $(SRC_DEP) $(HFILES) Makefile
  36.         ld $(LDFLAGS) -L$(LIBPATH) -T usb.lds -o $@ $(USB_OBJ) $(LIBS)  
  37.         kpack.exe usb.dll usb.drv
  38.  
  39. usb.obj : usb.c $(SRC_DEP) $(HFILES) Makefile
  40.         $(CC) $(DEFINES) $(INCLUDES) $(CFLAGS) -o usb.obj usb.c
  41.  
  42. %.obj : %.c $(HFILES)
  43.         $(CC) $(CFLAGS) -o $@ $<
  44.  
  45. %.obj: %.asm
  46.         as -o $@ $<
  47.  
  48.  
  49.