Changes between Version 7 and Version 8 of DeviceDrivers


Ignore:
Timestamp:
2011-10-20T21:09:01Z (13 years ago)
Author:
Jiri Svoboda
Comment:

Example makefile

Legend:

Unmodified
Added
Removed
Modified
  • DeviceDrivers

    v7 v8  
    3434 * add directory {{{uspace/drv/a/b/foo}}} to the DIRS definition in {{{uspace/Makefile}}}
    3535
    36 You can use an existing driver as a starting point, for example {{{uspace/drv/test/test1}}}. A driver is a C program similar to a HelenOS server or application. It is linked with {{{libdrv}}} (and the makefile should add libdrv's include path to the header search paths). The most basic DDF interfaces are defined in the header {{{ddf/driver.h}}}.
     36You can use an existing driver as a starting point, for example {{{uspace/drv/test/test1}}}. A driver is a C program similar to a HelenOS server or application. It is linked with {{{libdrv}}} (and the makefile should add libdrv's include path to the header search paths).
     37
     38An example driver makefile (with license stripped):
     39{{{
     40USPACE_PREFIX = ../../..
     41LIBS = $(LIBDRV_PREFIX)/libdrv.a
     42EXTRA_CFLAGS += -I$(LIBDRV_PREFIX)/include
     43BINARY = foo
     44
     45SOURCES = \
     46        foo.c
     47
     48include $(USPACE_PREFIX)/Makefile.common
     49}}}
     50
     51The most basic DDF interfaces are defined in the header {{{ddf/driver.h}}}.
    3752
    3853 * #include <ddf/driver.h>