[DRIVERS]
authorAmine Khaldi <amine.khaldi@reactos.org>
Sun, 9 Feb 2014 17:28:01 +0000 (17:28 +0000)
committerAmine Khaldi <amine.khaldi@reactos.org>
Sun, 9 Feb 2014 17:28:01 +0000 (17:28 +0000)
* Prepare the CMake scripts for PCH.
CORE-7716

svn path=/trunk/; revision=62077

56 files changed:
reactos/drivers/base/bootvid/CMakeLists.txt
reactos/drivers/base/condrv/CMakeLists.txt
reactos/drivers/base/kdcom/CMakeLists.txt
reactos/drivers/bus/acpi/CMakeLists.txt
reactos/drivers/bus/acpi/cmbatt/CMakeLists.txt
reactos/drivers/bus/acpi/compbatt/CMakeLists.txt
reactos/drivers/bus/isapnp/CMakeLists.txt
reactos/drivers/bus/pci/CMakeLists.txt
reactos/drivers/bus/pcix/CMakeLists.txt
reactos/drivers/bus/pcmcia/CMakeLists.txt
reactos/drivers/filesystems/cdfs/CMakeLists.txt
reactos/drivers/filesystems/ext2/CMakeLists.txt
reactos/drivers/filesystems/fastfat/CMakeLists.txt
reactos/drivers/filesystems/fs_rec/CMakeLists.txt
reactos/drivers/filesystems/msfs/CMakeLists.txt
reactos/drivers/filesystems/mup/CMakeLists.txt
reactos/drivers/filesystems/npfs/CMakeLists.txt
reactos/drivers/filesystems/ntfs/CMakeLists.txt
reactos/drivers/filters/mountmgr/CMakeLists.txt
reactos/drivers/hid/hidclass/CMakeLists.txt
reactos/drivers/input/i8042prt/CMakeLists.txt
reactos/drivers/input/kbdclass/CMakeLists.txt
reactos/drivers/input/mouclass/CMakeLists.txt
reactos/drivers/input/sermouse/CMakeLists.txt
reactos/drivers/ksfilter/ks/CMakeLists.txt
reactos/drivers/network/afd/CMakeLists.txt
reactos/drivers/network/dd/ne2000/CMakeLists.txt
reactos/drivers/network/dd/pcnet/CMakeLists.txt
reactos/drivers/network/dd/rtl8139/CMakeLists.txt
reactos/drivers/network/ndis/CMakeLists.txt
reactos/drivers/network/ndisuio/CMakeLists.txt
reactos/drivers/network/tcpip/CMakeLists.txt
reactos/drivers/network/tdi/CMakeLists.txt
reactos/drivers/sac/driver/CMakeLists.txt
reactos/drivers/serial/serenum/CMakeLists.txt
reactos/drivers/serial/serial/CMakeLists.txt
reactos/drivers/setup/blue/CMakeLists.txt
reactos/drivers/storage/class/cdrom/CMakeLists.txt
reactos/drivers/storage/class/cdrom_new/CMakeLists.txt
reactos/drivers/storage/class/disk_new/CMakeLists.txt
reactos/drivers/storage/classpnp/CMakeLists.txt
reactos/drivers/storage/fdc/fdc/CMakeLists.txt
reactos/drivers/storage/floppy/CMakeLists.txt
reactos/drivers/storage/ide/pciidex/CMakeLists.txt
reactos/drivers/storage/ide/uniata/CMakeLists.txt
reactos/drivers/storage/scsiport/CMakeLists.txt
reactos/drivers/usb/usbccgp/CMakeLists.txt
reactos/drivers/usb/usbehci/CMakeLists.txt
reactos/drivers/usb/usbhub/CMakeLists.txt
reactos/drivers/usb/usbohci/CMakeLists.txt
reactos/drivers/usb/usbstor/CMakeLists.txt
reactos/drivers/usb/usbuhci/CMakeLists.txt
reactos/drivers/wdm/audio/backpln/portcls/CMakeLists.txt
reactos/drivers/wdm/audio/filters/kmixer/CMakeLists.txt
reactos/drivers/wdm/audio/legacy/wdmaud/CMakeLists.txt
reactos/drivers/wdm/audio/sysaudio/CMakeLists.txt

index 43a1fc1..4303b27 100644 (file)
@@ -1,29 +1,30 @@
 
 spec2def(bootvid.dll bootvid.spec ADD_IMPORTLIB)
 
-list(APPEND SOURCE
-    bootvid.rc
-    ${CMAKE_CURRENT_BINARY_DIR}/bootvid.def)
-
-if(ARCH STREQUAL "i386" OR ARCH STREQUAL "amd64")
-list(APPEND SOURCE
-    i386/bootvid.c
-    i386/bootdata.c
-    i386/vga.c)
+if((ARCH STREQUAL "i386") OR (ARCH STREQUAL "amd64"))
+    list(APPEND SOURCE
+        i386/bootvid.c
+        i386/bootdata.c
+        i386/vga.c)
 elseif(ARCH STREQUAL "arm")
-list(APPEND SOURCE
-    arm/bootvid.c
-    arm/bootdata.c)
-endif(ARCH STREQUAL "i386" OR ARCH STREQUAL "amd64")
+    list(APPEND SOURCE
+        arm/bootvid.c
+        arm/bootdata.c)
+endif()
 
-add_library(bootvid SHARED ${SOURCE})
+list(APPEND SOURCE precomp.h)
+
+add_library(bootvid SHARED
+    ${SOURCE}
+    bootvid.rc
+    ${CMAKE_CURRENT_BINARY_DIR}/bootvid.def)
 
 set_entrypoint(bootvid 0)
 set_subsystem(bootvid native)
 set_image_base(bootvid 0x00010000)
 
 add_importlibs(bootvid ntoskrnl hal)
-add_pch(bootvid precomp.h)
+add_pch(bootvid precomp.h SOURCE)
 add_dependencies(bootvid psdk bugcodes)
 add_cd_file(TARGET bootvid DESTINATION reactos/system32 NO_CAB FOR all)
 
index ab53c8e..b4137ce 100644 (file)
@@ -3,13 +3,17 @@ include_directories(${REACTOS_SOURCE_DIR}/include/reactos/drivers)
 
 ## spec2def(condrv.sys condrv.spec ADD_IMPORTLIB)
 
-add_library(condrv SHARED
+list(APPEND SOURCE
     condrv.c
     control.c
+    condrv.h)
+
+add_library(condrv SHARED
+    ${SOURCE}
     condrv.rc)
     # ${CMAKE_CURRENT_BINARY_DIR}/condrv.def)
 
-add_pch(condrv condrv.h)
+add_pch(condrv condrv.h SOURCE)
 
 set_module_type(condrv kernelmodedriver)
 target_link_libraries(condrv ${PSEH_LIB})
index 448cd8f..725e86b 100644 (file)
@@ -1,10 +1,14 @@
 
 spec2def(kdcom.dll kdcom.spec ADD_IMPORTLIB)
 
-add_library(kdcom SHARED
+list(APPEND SOURCE
     kdcom.c
     kddll.c
     kdserial.c
+    kddll.h)
+
+add_library(kdcom SHARED
+    ${SOURCE}
     kdcom.rc
     ${CMAKE_CURRENT_BINARY_DIR}/kdcom.def)
 
@@ -15,5 +19,5 @@ set_image_base(kdcom 0x00010000)
 add_importlibs(kdcom ntoskrnl hal)
 target_link_libraries(kdcom cportlib)
 add_dependencies(kdcom psdk bugcodes)
-
+add_pch(kdcom kddll.h SOURCE)
 add_cd_file(TARGET kdcom DESTINATION reactos/system32 NO_CAB FOR all)
index 870b773..2eb4e66 100644 (file)
@@ -7,7 +7,7 @@ if(ARCH STREQUAL "amd64")
     add_definitions(-DWIN64)
 endif()
 
-add_library(acpica
+list(APPEND ACPICA_SOURCE
     acpica/dispatcher/dsargs.c
     acpica/dispatcher/dscontrol.c
     acpica/dispatcher/dsfield.c
@@ -122,7 +122,6 @@ add_library(acpica
     acpica/utilities/utdecode.c
     acpica/utilities/utdelete.c
     acpica/utilities/uteval.c
-    acpica/utilities/utglobal.c
     acpica/utilities/utids.c
     acpica/utilities/utinit.c
     acpica/utilities/utlock.c
@@ -135,12 +134,18 @@ add_library(acpica
     acpica/utilities/utstate.c
     acpica/utilities/uttrack.c
     acpica/utilities/utxface.c
-    acpica/utilities/utxferror.c)
+    acpica/utilities/utxferror.c
+    acpica/include/acpi.h)
+
+add_library(acpica
+    ${ACPICA_SOURCE}
+    acpica/utilities/utglobal.c)
 
+add_pch(acpica acpica/include/acpi.h ACPICA_SOURCE)
 set_target_properties(acpica PROPERTIES COMPILE_DEFINITIONS "ACPI_USE_LOCAL_CACHE")
 add_dependencies(acpica bugcodes)
 
-add_library(acpi SHARED
+list(APPEND ACPI_SOURCE
     busmgr/bus.c
     busmgr/button.c
     busmgr/power.c
@@ -153,11 +158,14 @@ add_library(acpi SHARED
     pnp.c
     power.c
     buspdo.c
-    main.c)
+    main.c
+    precomp.h)
 
+add_library(acpi SHARED ${ACPI_SOURCE})
 set_module_type(acpi kernelmodedriver)
 target_link_libraries(acpi wdmguid acpica ${PSEH_LIB})
 add_importlibs(acpi ntoskrnl hal)
+add_pch(acpi precomp.h ACPI_SOURCE)
 add_cd_file(TARGET acpi DESTINATION reactos/system32/drivers NO_CAB FOR all)
 
 add_subdirectory(cmbatt)
index 6354a66..ff112bb 100644 (file)
@@ -4,15 +4,17 @@ list(APPEND SOURCE
     cmexec.c
     cmbpnp.c
     cmbwmi.c
+    cmbatt.h)
+
+add_library(cmbatt SHARED
+    ${SOURCE}
     guid.c
     cmbatt.rc)
 
-add_library(cmbatt SHARED ${SOURCE})
-
 set_module_type(cmbatt kernelmodedriver)
 add_importlibs(cmbatt ntoskrnl hal battc wmilib)
 
-add_pch(cmbatt cmbatt.h)
+add_pch(cmbatt cmbatt.h SOURCE)
 
 
 add_cd_file(TARGET cmbatt DESTINATION reactos/system32/drivers FOR all)
index 8923c64..f85e15b 100644 (file)
@@ -3,14 +3,16 @@ list(APPEND SOURCE
     compbatt.c
     compmisc.c
     comppnp.c
+    compbatt.h)
+
+add_library(compbatt SHARED
+    ${SOURCE}
     guid.c
     compbatt.rc)
 
-add_library(compbatt SHARED ${SOURCE})
-
 set_module_type(compbatt kernelmodedriver)
 add_importlibs(compbatt ntoskrnl hal battc)
 
-add_pch(compbatt compbatt.h)
+add_pch(compbatt compbatt.h SOURCE)
 
 add_cd_file(TARGET compbatt DESTINATION reactos/system32/drivers FOR all)
index ea6eea4..8646764 100644 (file)
@@ -1,12 +1,13 @@
 
-add_library(isapnp SHARED
+list(APPEND SOURCE
     isapnp.c
     pdo.c
     fdo.c
     hardware.c
-    isapnp.rc)
+    isapnp.h)
 
+add_library(isapnp SHARED ${SOURCE} isapnp.rc)
 set_module_type(isapnp kernelmodedriver)
 add_importlibs(isapnp ntoskrnl hal)
-add_pch(isapnp isapnp.h)
+add_pch(isapnp isapnp.h SOURCE)
 add_cd_file(TARGET isapnp DESTINATION reactos/system32/drivers NO_CAB FOR all)
index 5917718..79125d8 100644 (file)
@@ -1,11 +1,12 @@
 
-add_library(pci SHARED
+list(APPEND SOURCE
     fdo.c
     pci.c
     pdo.c
-    pci.rc)
+    pci.h)
 
+add_library(pci SHARED ${SOURCE} pci.rc)
 set_module_type(pci kernelmodedriver)
 add_importlibs(pci ntoskrnl hal)
-add_pch(pci pci.h)
+add_pch(pci pci.h SOURCE)
 add_cd_file(TARGET pci DESTINATION reactos/system32/drivers NO_CAB FOR all)
index af11068..fa4e3bd 100644 (file)
@@ -26,7 +26,6 @@ list(APPEND SOURCE
     dispatch.c
     enum.c
     fdo.c
-    guid.c
     hookhal.c
     init.c
     pcivrify.c
@@ -34,14 +33,17 @@ list(APPEND SOURCE
     power.c
     usage.c
     utils.c
-    pci.rc)
+    pci.h)
 
-add_library(pcix SHARED ${SOURCE})
+add_library(pcix SHARED
+    ${SOURCE}
+    guid.c
+    pci.rc)
 
 set_module_type(pcix kernelmodedriver)
 add_importlibs(pcix ntoskrnl hal)
 
-add_pch(pcix pci.h)
+add_pch(pcix pci.h SOURCE)
 add_dependencies(pcix pciclass)
 
 add_cd_file(TARGET pcix DESTINATION reactos/system32/drivers NO_CAB FOR all)
index 65ca678..6a7f6fb 100644 (file)
@@ -1,11 +1,12 @@
 
-add_library(pcmcia SHARED
+list(APPEND SOURCE
     fdo.c
     pcmcia.c
     pdo.c
-    pcmcia.rc)
+    pcmcia.h)
 
+add_library(pcmcia SHARED ${SOURCE} pcmcia.rc)
 set_module_type(pcmcia kernelmodedriver)
-add_pch(pcmcia pcmcia.h)
+add_pch(pcmcia pcmcia.h SOURCE)
 add_importlibs(pcmcia ntoskrnl hal)
 add_cd_file(TARGET pcmcia DESTINATION reactos/system32/drivers NO_CAB FOR all)
index 6aad254..9bec1b4 100644 (file)
@@ -15,13 +15,13 @@ list(APPEND SOURCE
     misc.c
     rw.c
     volinfo.c
-    cdfs.rc)
+    cdfs.h)
 
-add_library(cdfs SHARED ${SOURCE})
+add_library(cdfs SHARED ${SOURCE} cdfs.rc)
 
 set_module_type(cdfs kernelmodedriver)
 add_importlibs(cdfs ntoskrnl hal)
 
-add_pch(cdfs cdfs.h)
+add_pch(cdfs cdfs.h SOURCE)
 
 add_cd_file(TARGET cdfs DESTINATION reactos/system32/drivers NO_CAB FOR all)
index 28bcea3..54b8a2a 100644 (file)
@@ -19,8 +19,9 @@ list(APPEND SOURCE
     src/read.c
     src/cleanup.c
     src/misc.c
-    src/shutdown.c)
-    
+    src/shutdown.c
+    inc/ext2fsd.h)
+
 add_library(ext2fs SHARED ${SOURCE})
 
 if(NOT MSVC)
@@ -29,7 +30,7 @@ endif()
 
 allow_warnings(ext2fs)
 target_link_libraries(ext2fs ${PSEH_LIB})
-add_pch(ext2fs inc/ext2fsd.h)
+add_pch(ext2fs inc/ext2fsd.h SOURCE)
 set_module_type(ext2fs kernelmodedriver)
 add_importlibs(ext2fs ntoskrnl hal)
 add_cd_file(TARGET ext2fs DESTINATION reactos/system32/drivers NO_CAB FOR all)
index af6a263..fdc90be 100644 (file)
@@ -21,13 +21,13 @@ list(APPEND SOURCE
     shutdown.c
     string.c
     volume.c
-    vfatfs.rc)
+    vfat.h)
 
-add_library(fastfat SHARED ${SOURCE})
+add_library(fastfat SHARED ${SOURCE} vfatfs.rc)
 
 set_module_type(fastfat kernelmodedriver)
 add_importlibs(fastfat ntoskrnl hal)
 
-add_pch(fastfat vfat.h)
+add_pch(fastfat vfat.h SOURCE)
 
 add_cd_file(TARGET fastfat DESTINATION reactos/system32/drivers NO_CAB FOR all)
index dba33ea..0cff511 100644 (file)
@@ -1,5 +1,5 @@
 
-add_library(fs_rec SHARED
+list(APPEND SOURCE
     blockdev.c
     cdfs.c
     ext2.c
@@ -7,9 +7,10 @@ add_library(fs_rec SHARED
     fs_rec.c
     ntfs.c
     udfs.c
-    fs_rec.rc)
+    fs_rec.h)
 
+add_library(fs_rec SHARED ${SOURCE} fs_rec.rc)
 set_module_type(fs_rec kernelmodedriver)
 add_importlibs(fs_rec ntoskrnl hal)
-add_pch(fs_rec fs_rec.h)
+add_pch(fs_rec fs_rec.h SOURCE)
 add_cd_file(TARGET fs_rec DESTINATION reactos/system32/drivers FOR all)
index 62f79d5..7878212 100644 (file)
@@ -5,13 +5,13 @@ list(APPEND SOURCE
     fsctrl.c
     msfs.c
     rw.c
-    msfs.rc)
+    msfs.h)
 
-add_library(msfs SHARED ${SOURCE})
+add_library(msfs SHARED ${SOURCE} msfs.rc)
 
 set_module_type(msfs kernelmodedriver)
 add_importlibs(msfs ntoskrnl hal)
 
-add_pch(msfs msfs.h)
+add_pch(msfs msfs.h SOURCE)
 
 add_cd_file(TARGET msfs DESTINATION reactos/system32/drivers FOR all)
index c341a34..87e1eeb 100644 (file)
@@ -1,10 +1,11 @@
 
-add_library(mup SHARED
+list(APPEND SOURCE
     create.c
     mup.c
-    mup.rc)
+    mup.h)
 
+add_library(mup SHARED ${SOURCE} mup.rc)
 set_module_type(mup kernelmodedriver)
 add_importlibs(mup ntoskrnl hal)
-add_pch(mup mup.h)
+add_pch(mup mup.h SOURCE)
 add_cd_file(TARGET mup DESTINATION reactos/system32/drivers FOR all)
index 0797093..2c1c98a 100644 (file)
@@ -19,11 +19,12 @@ list(APPEND SOURCE
     volinfo.c
     waitsup.c
     write.c
-    writesup.c)
+    writesup.c
+    npfs.h)
 
 add_library(npfs SHARED ${SOURCE})
 set_module_type(npfs kernelmodedriver)
 target_link_libraries(npfs ${PSEH_LIB})
 add_importlibs(npfs ntoskrnl hal)
-add_pch(npfs npfs.h)
+add_pch(npfs npfs.h SOURCE)
 add_cd_file(TARGET npfs DESTINATION reactos/system32/drivers FOR all)
index 9094520..ed4875f 100644 (file)
@@ -15,13 +15,13 @@ list(APPEND SOURCE
     ntfs.c
     rw.c
     volinfo.c
-    ntfs.rc)
+    ntfs.h)
 
-add_library(ntfs SHARED ${SOURCE})
+add_library(ntfs SHARED ${SOURCE} ntfs.rc)
 
 set_module_type(ntfs kernelmodedriver)
 add_importlibs(ntfs ntoskrnl hal)
 
-add_pch(ntfs ntfs.h)
+add_pch(ntfs ntfs.h SOURCE)
 
 add_cd_file(TARGET ntfs DESTINATION reactos/system32/drivers NO_CAB FOR all)
index 72586b5..ab90492 100644 (file)
@@ -7,12 +7,12 @@ list(APPEND SOURCE
     point.c
     symlink.c
     uniqueid.c
-    mountmgr.rc)
+    mntmgr.h)
 
-add_library(mountmgr SHARED ${SOURCE})
+add_library(mountmgr SHARED ${SOURCE} mountmgr.rc)
 target_link_libraries(mountmgr wdmguid ioevent)
 set_module_type(mountmgr kernelmodedriver)
 add_importlibs(mountmgr ntoskrnl hal)
-add_pch(mountmgr mntmgr.h)
+add_pch(mountmgr mntmgr.h SOURCE)
 add_cd_file(TARGET mountmgr DESTINATION reactos/system32/drivers NO_CAB FOR all)
 
index a2dae40..93a1b68 100644 (file)
@@ -4,13 +4,15 @@ spec2def(hidclass.sys hidclass.spec ADD_IMPORTLIB)
 list(APPEND SOURCE
     fdo.c
     hidclass.c
-    hidclass.rc
     pdo.c
+    precomp.h)
+
+add_library(hidclass SHARED
+    ${SOURCE}
     guid.c
+    hidclass.rc
     ${CMAKE_CURRENT_BINARY_DIR}/hidclass.def)
 
-add_library(hidclass SHARED ${SOURCE})
-
 set_entrypoint(hidclass 0)
 set_subsystem(hidclass native)
 set_target_properties(hidclass PROPERTIES SUFFIX ".sys")
@@ -18,5 +20,5 @@ set_target_properties(hidclass PROPERTIES SUFFIX ".sys")
 
 add_importlibs(hidclass ntoskrnl hidparse hal)
 add_dependencies(hidclass bugcodes)
-
+add_pch(hidclass precomp.h SOURCE)
 add_cd_file(TARGET hidclass DESTINATION reactos/system32/drivers NO_CAB FOR all)
index 917e7f2..5976ce9 100644 (file)
@@ -1,5 +1,5 @@
 
-add_library(i8042prt SHARED
+list(APPEND SOURCE
     createclose.c
     i8042prt.c
     keyboard.c
@@ -9,10 +9,14 @@ add_library(i8042prt SHARED
     ps2pp.c
     readwrite.c
     registry.c
+    i8042prt.h)
+
+add_library(i8042prt SHARED
+    ${SOURCE}
     guid.c
     i8042prt.rc)
 
 set_module_type(i8042prt kernelmodedriver)
 add_importlibs(i8042prt ntoskrnl hal)
-add_pch(i8042prt i8042prt.h)
+add_pch(i8042prt i8042prt.h SOURCE)
 add_cd_file(TARGET i8042prt DESTINATION reactos/system32/drivers NO_CAB FOR all)
index f899f64..4e43d82 100644 (file)
@@ -1,12 +1,16 @@
 
-add_library(kbdclass SHARED
+list(APPEND SOURCE
     kbdclass.c
     misc.c
+    kbdclass.h)
+
+add_library(kbdclass SHARED
+    ${SOURCE}
     guid.c
     kbdclass.rc)
 
 set_module_type(kbdclass kernelmodedriver)
-add_pch(kbdclass kbdclass.h)
+add_pch(kbdclass kbdclass.h SOURCE)
 target_link_libraries(kbdclass ${PSEH_LIB})
 add_importlibs(kbdclass ntoskrnl hal)
 add_cd_file(TARGET kbdclass DESTINATION reactos/system32/drivers NO_CAB FOR all)
index 821c729..e35a469 100644 (file)
@@ -1,12 +1,16 @@
 
-add_library(mouclass SHARED
+list(APPEND SOURCE
     misc.c
     mouclass.c
+    mouclass.h)
+
+add_library(mouclass SHARED
+    ${SOURCE}
     guid.c
     mouclass.rc)
 
 set_module_type(mouclass kernelmodedriver)
-add_pch(mouclass mouclass.h)
 target_link_libraries(mouclass ${PSEH_LIB})
 add_importlibs(mouclass ntoskrnl hal)
+add_pch(mouclass mouclass.h SOURCE)
 add_cd_file(TARGET mouclass DESTINATION reactos/system32/drivers FOR all)
index 42dfee9..b2cd5da 100644 (file)
@@ -1,5 +1,5 @@
 
-add_library(sermouse SHARED
+list(APPEND SOURCE
     createclose.c
     detect.c
     fdo.c
@@ -7,9 +7,10 @@ add_library(sermouse SHARED
     misc.c
     readmouse.c
     sermouse.c
-    sermouse.rc)
+    sermouse.h)
 
+add_library(sermouse SHARED ${SOURCE} sermouse.rc)
 set_module_type(sermouse kernelmodedriver)
-add_pch(sermouse sermouse.h)
+add_pch(sermouse sermouse.h SOURCE)
 add_importlibs(sermouse ntoskrnl hal)
 add_cd_file(TARGET sermouse DESTINATION reactos/system32/drivers FOR all)
index 18d74c6..67eef69 100644 (file)
@@ -28,14 +28,17 @@ list(APPEND SOURCE
     worker.c
     kcom.c
     swenum.c
-    ks.rc
-    ${CMAKE_CURRENT_BINARY_DIR}/ks.def)
+    precomp.h)
 
 if(MSVC)
     add_asm_files(ks_asm msvc.S)
 endif()
 
-add_library(ks SHARED ${SOURCE} ${ks_asm})
+add_library(ks SHARED
+    ${SOURCE}
+    ${ks_asm}
+    ks.rc
+    ${CMAKE_CURRENT_BINARY_DIR}/ks.def)
 
 set_target_properties(ks PROPERTIES SUFFIX ".sys")
 
@@ -44,7 +47,7 @@ set_subsystem(ks native)
 set_image_base(ks 0x00010000)
 
 target_link_libraries(ks ${PSEH_LIB})
-add_pch(ks priv.h)
+add_pch(ks precomp.h SOURCE)
 add_importlibs(ks ntoskrnl hal)
 add_dependencies(ks psdk bugcodes)
 add_cd_file(TARGET ks DESTINATION reactos/system32/drivers FOR all)
index f28c266..4776226 100644 (file)
@@ -16,12 +16,12 @@ list(APPEND SOURCE
     afd/tdi.c
     afd/tdiconn.c
     afd/write.c
-    afd.rc)
+    include/afd.h)
 
-add_library(afd SHARED ${SOURCE})
+add_library(afd SHARED ${SOURCE} afd.rc)
 target_link_libraries(afd ${PSEH_LIB})
 
 set_module_type(afd kernelmodedriver)
 add_importlibs(afd ntoskrnl hal)
-add_pch(afd include/afd.h)
+add_pch(afd include/afd.h SOURCE)
 add_cd_file(TARGET afd DESTINATION reactos/system32/drivers FOR all)
index 32c2d8b..f11974f 100644 (file)
@@ -4,10 +4,10 @@ include_directories(BEFORE include)
 list(APPEND SOURCE
     ne2000/8390.c
     ne2000/main.c
-    ne2000.rc)
+    include/ne2000.h)
 
-add_library(ne2000 SHARED ${SOURCE})
-add_pch(ne2000 include/ne2000.h)
+add_library(ne2000 SHARED ${SOURCE} ne2000.rc)
+add_pch(ne2000 include/ne2000.h SOURCE)
 set_module_type(ne2000 kernelmodedriver)
 add_importlibs(ne2000 ndis ntoskrnl hal)
 add_cd_file(TARGET ne2000 DESTINATION reactos/system32/drivers FOR all)
index b1a5136..0e78bf3 100644 (file)
@@ -8,10 +8,10 @@ add_definitions(
 list(APPEND SOURCE
     pcnet.c
     requests.c
-    pcnet.rc)
+    pcnet.h)
 
-add_library(pcnet SHARED ${SOURCE})
-add_pch(pcnet pcnet.h)
+add_library(pcnet SHARED ${SOURCE} pcnet.rc)
+add_pch(pcnet pcnet.h SOURCE)
 set_module_type(pcnet kernelmodedriver)
 add_importlibs(pcnet ndis ntoskrnl hal)
 add_cd_file(TARGET pcnet DESTINATION reactos/system32/drivers FOR all)
index 9633348..9a6a975 100644 (file)
@@ -9,10 +9,10 @@ list(APPEND SOURCE
     hardware.c
     info.c
     interrupt.c
-    rtl8139.rc)
+    nic.h)
 
-add_library(rtl8139 SHARED ${SOURCE})
-add_pch(rtl8139 nic.h)
+add_library(rtl8139 SHARED ${SOURCE} rtl8139.rc)
+add_pch(rtl8139 nic.h SOURCE)
 set_module_type(rtl8139 kernelmodedriver)
 add_importlibs(rtl8139 ndis ntoskrnl hal)
 add_cd_file(TARGET rtl8139 DESTINATION reactos/system32/drivers FOR all)
index 4ebdac0..3a81a64 100644 (file)
@@ -32,15 +32,17 @@ list(APPEND SOURCE
     ndis/protocol.c
     ndis/string.c
     ndis/time.c
+    include/ndissys.h)
+
+add_library(ndis SHARED
+    ${SOURCE}
     ndis.rc
     ${CMAKE_CURRENT_BINARY_DIR}/ndis.def)
 
-add_library(ndis SHARED ${SOURCE})
-
 set_module_type(ndis kernelmodedriver)
 add_importlibs(ndis ntoskrnl hal)
 
-add_pch(ndis include/ndissys.h)
+add_pch(ndis include/ndissys.h SOURCE)
 
 add_cd_file(TARGET ndis DESTINATION reactos/system32/drivers FOR all)
 
index 3ab2f93..5fd566b 100644 (file)
@@ -7,19 +7,16 @@ include_directories(
     ${REACTOS_SOURCE_DIR}/include/reactos/drivers/ndisuio)
 
 list(APPEND SOURCE
-     createclose.c
-     ioctl.c
-     main.c
-     misc.c
-     protocol.c
-     readwrite.c
-     ndisuio.rc)
-
-add_library(ndisuio SHARED ${SOURCE})
+    createclose.c
+    ioctl.c
+    main.c
+    misc.c
+    protocol.c
+    readwrite.c
+    ndisuio.h)
 
+add_library(ndisuio SHARED ${SOURCE} ndisuio.rc)
 set_module_type(ndisuio kernelmodedriver)
 add_importlibs(ndisuio ndis ntoskrnl hal)
-
-add_pch(ndisuio ndisuio.h)
-
+add_pch(ndisuio ndisuio.h SOURCE)
 add_cd_file(TARGET ndisuio DESTINATION reactos/system32/drivers FOR all)
index 30dac48..317f112 100644 (file)
@@ -24,11 +24,13 @@ list(APPEND SOURCE
     tcpip/proto.c
     tcpip/tinfo.c
     tcpip/wait.c
+    include/precomp.h)
+
+add_library(tcpip SHARED
+    ${SOURCE}
     tcpip.rc
     ${CMAKE_CURRENT_BINARY_DIR}/tcpip.def)
 
-add_library(tcpip SHARED ${SOURCE})
-
 target_link_libraries(tcpip
     ip
     lwip
@@ -38,6 +40,6 @@ target_link_libraries(tcpip
 set_module_type(tcpip kernelmodedriver)
 add_importlibs(tcpip ndis ntoskrnl hal)
 
-add_pch(tcpip include/precomp.h)
+add_pch(tcpip include/precomp.h SOURCE)
 
 add_cd_file(TARGET tcpip DESTINATION reactos/system32/drivers FOR all)
index f8b6a74..2db81d3 100644 (file)
@@ -15,15 +15,18 @@ list(APPEND SOURCE
     cte/string.c
     cte/timer.c
     misc/main.c
-    misc/tdi.rc
     tdi/dereg.c
     tdi/handler.c
     tdi/obsolete.c
     tdi/stubs.c
+    precomp.h)
+
+add_library(tdi SHARED
+    ${SOURCE}
+    misc/tdi.rc
     ${CMAKE_CURRENT_BINARY_DIR}/tdi.def)
 
-add_library(tdi SHARED ${SOURCE})
-add_pch(tdi precomp.h)
+add_pch(tdi precomp.h SOURCE)
 set_module_type(tdi kernelmodedriver)
 add_importlibs(tdi ntoskrnl hal)
 add_cd_file(TARGET tdi DESTINATION reactos/system32/drivers FOR all)
index f07ff7a..3705134 100644 (file)
@@ -2,21 +2,23 @@
 include_directories(${REACTOS_SOURCE_DIR})
 
 list(APPEND SOURCE
-     chanmgr.c
-     channel.c
-     cmdchan.c
-     concmd.c
-     conmgr.c
-     data.c
-     dispatch.c
-     init.c
-     memory.c
-     rawchan.c
-     util.c
-     vtutf8chan.c)
+    chanmgr.c
+    channel.c
+    cmdchan.c
+    concmd.c
+    conmgr.c
+    data.c
+    dispatch.c
+    init.c
+    memory.c
+    rawchan.c
+    util.c
+    vtutf8chan.c
+    sacdrv.h)
 
 add_library(sacdrv SHARED ${SOURCE} sacdrv.rc)
 set_module_type(sacdrv kernelmodedriver)
 add_importlibs(sacdrv ntoskrnl hal)
 add_dependencies(sacdrv sacmsg)
+add_pch(sacdrv sacdrv.h SOURCE)
 add_cd_file(TARGET sacdrv DESTINATION reactos/system32/drivers NO_CAB FOR all)
index 8fd1912..edb5738 100644 (file)
@@ -1,14 +1,18 @@
 
-add_library(serenum SHARED
+list(APPEND SOURCE
     detect.c
     fdo.c
     misc.c
     pdo.c
     serenum.c
+    serenum.h)
+
+add_library(serenum SHARED
+    ${SOURCE}
     guid.c
     serenum.rc)
 
-add_pch(serenum serenum.h)
+add_pch(serenum serenum.h SOURCE)
 set_module_type(serenum kernelmodedriver)
 add_importlibs(serenum ntoskrnl hal)
 add_cd_file(TARGET serenum DESTINATION reactos/system32/drivers FOR all)
index 6e3e1d9..b423855 100644 (file)
@@ -1,5 +1,5 @@
 
-add_library(serial SHARED
+list(APPEND SOURCE
     circularbuffer.c
     cleanup.c
     close.c
@@ -12,10 +12,14 @@ add_library(serial SHARED
     power.c
     rw.c
     serial.c
+    serial.h)
+
+add_library(serial SHARED
+    ${SOURCE}
     guid.c
     serial.rc)
 
-add_pch(serial serial.h)
 set_module_type(serial kernelmodedriver)
 add_importlibs(serial ntoskrnl hal)
+add_pch(serial serial.h SOURCE)
 add_cd_file(TARGET serial DESTINATION reactos/system32/drivers FOR all)
index a965797..d1539a7 100644 (file)
@@ -1,9 +1,13 @@
 
 include_directories(${REACTOS_SOURCE_DIR}/include/reactos/drivers)
 
-add_library(blue SHARED blue.c font.c blue.rc)
+list(APPEND SOURCE
+    blue.c
+    font.c
+    blue.h)
 
-add_pch(blue blue.h)
+add_library(blue SHARED ${SOURCE} blue.rc)
 set_module_type(blue kernelmodedriver)
 add_importlibs(blue ntoskrnl hal)
+add_pch(blue blue.h SOURCE)
 add_cd_file(TARGET blue DESTINATION reactos/system32/drivers NO_CAB FOR all)
index 7b91827..2f33565 100644 (file)
@@ -1,7 +1,12 @@
 
 include_directories(${REACTOS_SOURCE_DIR}/drivers/storage/class)
 
-add_library(cdrom SHARED cdrom.c findscsi.c cdrom.rc)
+list(APPEND SOURCE
+    cdrom.c
+    findscsi.c
+    precomp.h)
+
+add_library(cdrom SHARED ${SOURCE} cdrom.rc)
 
 set_module_type(cdrom kernelmodedriver)
 add_importlibs(cdrom
@@ -10,5 +15,5 @@ add_importlibs(cdrom
     ntoskrnl
     hal)
 
-add_pch(cdrom precomp.h)
+add_pch(cdrom precomp.h SOURCE)
 add_cd_file(TARGET cdrom DESTINATION reactos/system32/drivers NO_CAB FOR all)
index 18ad587..1c425b6 100644 (file)
@@ -6,7 +6,8 @@ list(APPEND SOURCE
     data.c
     ioctl.c
     mmc.c
-    sec.c)
+    sec.c
+    cdrom.h)
 
 add_library(cdrom_new SHARED ${SOURCE})
 
@@ -22,3 +23,4 @@ endif()
 
 set_module_type(cdrom_new kernelmodedriver)
 add_importlibs(cdrom_new classpnp ntoskrnl hal)
+add_pch(cdrom_new cdrom.h SOURCE)
index 98e8139..61e15dc 100644 (file)
@@ -7,11 +7,10 @@ list(APPEND SOURCE
     enum.c
     geometry.c
     part.c
-    pnp.c)
+    pnp.c
+    disk.h)
 
-add_library(disk_new SHARED
-    ${SOURCE}
-    disk.rc)
+add_library(disk_new SHARED ${SOURCE} disk.rc)
 
 target_link_libraries(disk_new libcntpr wdmguid)
 if(ARCH STREQUAL "i386")
@@ -24,4 +23,5 @@ endif()
 
 set_module_type(disk_new kernelmodedriver)
 add_importlibs(disk_new classpnp ntoskrnl hal)
+add_pch(disk_new disk.h SOURCE)
 add_cd_file(TARGET disk_new DESTINATION reactos/system32/drivers NO_CAB FOR all)
index 29ce383..69cfd37 100644 (file)
@@ -26,12 +26,13 @@ list(APPEND SOURCE
     retry.c
     utils.c
     xferpkt.c
-    guid.c
-    ${CMAKE_CURRENT_BINARY_DIR}/classpnp.def)
+    classp.h)
 
 add_library(classpnp SHARED
     ${SOURCE}
-    class.rc)
+    guid.c
+    class.rc
+    ${CMAKE_CURRENT_BINARY_DIR}/classpnp.def)
 
 if(ARCH STREQUAL "i386")
     # FIXME: http://www.cmake.org/Bug/view.php?id=12998
@@ -40,7 +41,7 @@ if(ARCH STREQUAL "i386")
     endif()
 endif()
 
-add_pch(classpnp classp.h)
+add_pch(classpnp classp.h SOURCE)
 target_link_libraries(classpnp ${PSEH_LIB} libcntpr)
 set_module_type(classpnp kernelmodedriver)
 add_importlibs(classpnp hal ntoskrnl)
index 8dc87de..0871c0e 100644 (file)
@@ -1,12 +1,13 @@
 
-add_library(fdc SHARED
+list(APPEND SOURCE
     fdc.c
     fdo.c
     misc.c
     pdo.c
-    fdc.rc)
+    fdc.h)
 
+add_library(fdc SHARED ${SOURCE} fdc.rc)
 set_module_type(fdc kernelmodedriver)
 add_importlibs(fdc hal ntoskrnl)
-
+add_pch(fdc fdc.h SOURCE)
 add_cd_file(TARGET fdc DESTINATION reactos/system32/drivers FOR all)
index 8222c16..53659af 100644 (file)
@@ -1,14 +1,15 @@
 
-add_library(floppy SHARED
+list(APPEND SOURCE
     csqrtns.c
     floppy.c
     hardware.c
     ioctl.c
     readwrite.c
-    floppy.rc)
+    precomp.h)
 
+add_library(floppy SHARED ${SOURCE} floppy.rc)
 target_link_libraries(floppy csq)
-add_pch(floppy precomp.h)
+add_pch(floppy precomp.h SOURCE)
 set_module_type(floppy kernelmodedriver)
 add_importlibs(floppy hal ntoskrnl)
 add_cd_file(TARGET floppy DESTINATION reactos/system32/drivers NO_CAB FOR all)
index 65c21ef..d26e48e 100644 (file)
@@ -7,11 +7,14 @@ list(APPEND SOURCE
     misc.c
     pciidex.c
     pdo.c
+    pciidex.h)
+
+add_library(pciidex SHARED
+    ${SOURCE}
     pciidex.rc
     ${CMAKE_CURRENT_BINARY_DIR}/pciidex.def)
 
-add_library(pciidex SHARED ${SOURCE})
-add_pch(pciidex pciidex.h)
+add_pch(pciidex pciidex.h SOURCE)
 set_module_type(pciidex kernelmodedriver)
 add_importlibs(pciidex ntoskrnl)
 add_cd_file(TARGET pciidex DESTINATION reactos/system32/drivers NO_CAB FOR all)
index c201645..03d8237 100644 (file)
@@ -15,7 +15,8 @@ list(APPEND SOURCE
     id_probe.cpp
     id_queue.cpp
     id_sata.cpp
-    ros_glue/ros_glue.cpp)
+    ros_glue/ros_glue.cpp
+    stdafx.h)
 
 add_library(uniata SHARED ${SOURCE} idedma.rc)
 
@@ -26,7 +27,7 @@ if(NOT MSVC)
     set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS "-Wno-error -Wno-unused-but-set-variable -Wno-narrowing")
 endif()
 
-add_pch(uniata stdafx.h)
+add_pch(uniata stdafx.h SOURCE)
 set_module_type(uniata kernelmodedriver)
 add_importlibs(uniata scsiport ntoskrnl hal)
 add_cd_file(TARGET uniata DESTINATION reactos/system32/drivers NO_CAB FOR all)
index e2554ce..6ab1a49 100644 (file)
@@ -4,11 +4,14 @@ spec2def(scsiport.sys scsiport.spec ADD_IMPORTLIB)
 list(APPEND SOURCE
     scsiport.c
     stubs.c
+    precomp.h)
+
+add_library(scsiport SHARED
+    ${SOURCE}
     scsiport.rc
     ${CMAKE_CURRENT_BINARY_DIR}/scsiport.def)
-    
-add_library(scsiport SHARED ${SOURCE})
-add_pch(scsiport precomp.h)
+
+add_pch(scsiport precomp.h SOURCE)
 set_module_type(scsiport kernelmodedriver)
 add_importlibs(scsiport ntoskrnl hal)
 
index 9f852ac..15eab5b 100644 (file)
@@ -6,11 +6,23 @@ add_definitions(-DDEBUG_MODE)
 
 include_directories(${REACTOS_SOURCE_DIR}/ntoskrnl/include)
 
-add_library(usbccgp SHARED descriptor.c fdo.c function.c misc.c pdo.c usbccgp.c guid.c usbccgp.rc)
+list(APPEND SOURCE
+    descriptor.c
+    fdo.c
+    function.c
+    misc.c
+    pdo.c
+    usbccgp.c
+    usbccgp.h)
+
+add_library(usbccgp SHARED
+    ${SOURCE}
+    guid.c
+    usbccgp.rc)
 
 target_link_libraries(usbccgp ${PSEH_LIB})
 
 set_module_type(usbccgp kernelmodedriver)
 add_importlibs(usbccgp ntoskrnl hal usbd)
-
+add_pch(usbccgp usbccgp.h SOURCE)
 add_cd_file(TARGET usbccgp DESTINATION reactos/system32/drivers NO_CAB FOR all)
index 7c8e26a..8f1e50d 100644 (file)
@@ -11,10 +11,11 @@ list(APPEND SOURCE
     usb_request.cpp
     usb_queue.cpp
     hardware.cpp
-    guid.cpp)
+    usbehci.h)
 
 add_library(usbehci SHARED
     ${SOURCE}
+    guid.cpp
     usbehci.rc)
 
 target_link_libraries(usbehci
@@ -25,5 +26,5 @@ target_link_libraries(usbehci
 
 set_module_type(usbehci kernelmodedriver)
 add_importlibs(usbehci ntoskrnl hal usbd)
-
+add_pch(usbehci usbehci.h SOURCE)
 add_cd_file(TARGET usbehci DESTINATION reactos/system32/drivers NO_CAB FOR all)
index 029840a..5aa3ec7 100644 (file)
@@ -3,11 +3,22 @@ add_definitions(-DDEBUG_MODE)
 
 include_directories(${REACTOS_SOURCE_DIR}/ntoskrnl/include)
 
-add_library(usbhub SHARED fdo.c misc.c pdo.c hub_fdo.c usbhub.c guid.c usbhub.rc)
+list(APPEND SOURCE
+    fdo.c
+    hub_fdo.c
+    misc.c
+    pdo.c
+    usbhub.c
+    usbhub.h)
+
+add_library(usbhub SHARED
+    ${SOURCE}
+    guid.c
+    usbhub.rc)
 
 target_link_libraries(usbhub ${PSEH_LIB})
 
 set_module_type(usbhub kernelmodedriver)
 add_importlibs(usbhub ntoskrnl hal usbd)
-
+add_pch(usbhub usbhub.h SOURCE)
 add_cd_file(TARGET usbhub DESTINATION reactos/system32/drivers NO_CAB FOR all)
index 9bb8b82..53b05f4 100644 (file)
@@ -11,10 +11,11 @@ list(APPEND SOURCE
     usb_request.cpp
     usb_queue.cpp
     hardware.cpp
-    guid.cpp)
+    usbohci.h)
 
 add_library(usbohci SHARED
     ${SOURCE}
+    guid.cpp
     usbohci.rc)
 
 target_link_libraries(usbohci
@@ -25,5 +26,5 @@ target_link_libraries(usbohci
 
 set_module_type(usbohci kernelmodedriver)
 add_importlibs(usbohci ntoskrnl hal usbd)
-
+add_pch(usbohci usbohci.h SOURCE)
 add_cd_file(TARGET usbohci DESTINATION reactos/system32/drivers NO_CAB FOR all)
index ad23d41..4788194 100644 (file)
@@ -3,9 +3,24 @@ add_definitions(-DDEBUG_MODE)
 
 include_directories(${REACTOS_SOURCE_DIR}/ntoskrnl/include)
 
-add_library(usbstor SHARED descriptor.c disk.c fdo.c misc.c pdo.c queue.c error.c scsi.c usbstor.c guid.c usbstor.rc)
+list(APPEND SOURCE
+    descriptor.c
+    disk.c
+    fdo.c
+    misc.c
+    pdo.c
+    queue.c
+    error.c
+    scsi.c
+    usbstor.c
+    usbstor.h)
+
+add_library(usbstor SHARED
+    ${SOURCE}
+    guid.c
+    usbstor.rc)
 
 set_module_type(usbstor kernelmodedriver)
 add_importlibs(usbstor ntoskrnl hal usbd)
-
+add_pch(usbstor usbstor.h SOURCE)
 add_cd_file(TARGET usbstor DESTINATION reactos/system32/drivers NO_CAB FOR all)
index 6af8742..3ca8ffa 100644 (file)
@@ -12,10 +12,11 @@ list(APPEND SOURCE
     usb_request.cpp
     usb_queue.cpp
     hardware.cpp
-    guid.cpp)
+    usbuhci.h)
 
 add_library(usbuhci SHARED
     ${SOURCE}
+    guid.cpp
     usbuhci.rc)
 
 target_link_libraries(usbuhci
@@ -26,5 +27,5 @@ target_link_libraries(usbuhci
 
 set_module_type(usbuhci kernelmodedriver)
 add_importlibs(usbuhci ntoskrnl hal usbd)
-
+add_pch(usbuhci usbuhci.h SOURCE)
 add_cd_file(TARGET usbuhci DESTINATION reactos/system32/drivers NO_CAB FOR all)
index b8da61d..a9a3338 100644 (file)
@@ -47,18 +47,19 @@ list(APPEND SOURCE
     undoc.cpp
     unregister.cpp
     version.cpp
-    guid.cpp
-    ${CMAKE_CURRENT_BINARY_DIR}/portcls.def)
+    private.hpp)
 
 add_library(portcls SHARED
     ${SOURCE}
-    portcls.rc)
+    guid.cpp
+    portcls.rc
+    ${CMAKE_CURRENT_BINARY_DIR}/portcls.def)
 
 target_link_libraries(portcls
     libcntpr
     ${PSEH_LIB})
 
 set_module_type(portcls kernelmodedriver ENTRYPOINT 0 )
-add_pch(portcls private.hpp)
+add_pch(portcls private.hpp SOURCE)
 add_importlibs(portcls ntoskrnl ks drmk hal)
 add_cd_file(TARGET portcls DESTINATION reactos/system32/drivers FOR all)
index f49556d..16d22f6 100644 (file)
@@ -1,17 +1,19 @@
 
 include_directories(${REACTOS_SOURCE_DIR}/lib/3rdparty/libsamplerate)
 
-add_library(kmixer SHARED
+list(APPEND SOURCE
     kmixer.c
     filter.c
-    pin.c)
+    pin.c
+    kmixer.h)
 
+add_library(kmixer SHARED ${SOURCE})
 set_module_type(kmixer kernelmodedriver)
 
 target_link_libraries(kmixer
     libcntpr
     libsamplerate)
 
-add_pch(kmixer kmixer.h)
+add_pch(kmixer kmixer.h SOURCE)
 add_importlibs(kmixer ntoskrnl ks hal)
 add_cd_file(TARGET kmixer DESTINATION reactos/system32/drivers FOR all)
index 701ad5e..b4ccdd0 100644 (file)
@@ -5,20 +5,21 @@ include_directories(
     ${REACTOS_SOURCE_DIR}/lib/drivers/sound/mmixer
     ${REACTOS_SOURCE_DIR}/include/reactos/libs/sound)
 
-add_library(wdmaud SHARED
+list(APPEND SOURCE
     control.c
     deviface.c
     entry.c
     mmixer.c
     sup.c
-    wdmaud.rc)
+    wdmaud.h)
 
+add_library(wdmaud SHARED ${SOURCE} wdmaud.rc)
 set_module_type(wdmaud kernelmodedriver)
 
 target_link_libraries(wdmaud
     mmixer
     libcntpr)
 
-add_pch(wdmaud wdmaud.h)
+add_pch(wdmaud wdmaud.h SOURCE)
 add_importlibs(wdmaud ntoskrnl ks hal)
 add_cd_file(TARGET wdmaud DESTINATION reactos/system32/drivers FOR all)
index 94d57b6..32931d3 100644 (file)
@@ -1,16 +1,17 @@
 
 add_definitions(-D_COMDDK_)
 
-add_library(sysaudio SHARED
+list(APPEND SOURCE
     control.c
     deviface.c
     dispatcher.c
     main.c
     pin.c
-    sysaudio.rc)
+    sysaudio.h)
 
-add_pch(sysaudio sysaudio.h)
+add_library(sysaudio SHARED ${SOURCE} sysaudio.rc)
 set_module_type(sysaudio kernelmodedriver)
 target_link_libraries(sysaudio libcntpr)
 add_importlibs(sysaudio ntoskrnl ks hal)
+add_pch(sysaudio sysaudio.h SOURCE)
 add_cd_file(TARGET sysaudio DESTINATION reactos/system32/drivers FOR all)