Skip to content

Commit

Permalink
[NTOS] Modularize the files list with CMake includes.
Browse files Browse the repository at this point in the history
  • Loading branch information
HBelusca committed Oct 8, 2023
1 parent 11b7064 commit 057445f
Show file tree
Hide file tree
Showing 22 changed files with 522 additions and 371 deletions.
10 changes: 10 additions & 0 deletions ntoskrnl/cc/cc.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

list(APPEND SOURCE
cc/cacheman.c
cc/copy.c
cc/fs.c
cc/lazywrite.c
cc/mdl.c
cc/pin.c
cc/view.c
)
40 changes: 40 additions & 0 deletions ntoskrnl/config/config.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@

list(APPEND SOURCE
config/cmalloc.c
config/cmapi.c
config/cmboot.c
config/cmcheck.c
config/cmconfig.c
config/cmcontrl.c
config/cmdata.c
config/cmdelay.c
config/cmhook.c
config/cmhvlist.c
config/cminit.c
config/cmkcbncb.c
config/cmlazy.c
config/cmmapvw.c
config/cmnotify.c
config/cmparse.c
config/cmquota.c
config/cmse.c
config/cmsecach.c
config/cmsysini.c
config/cmvalche.c
config/cmwraprs.c
config/ntapi.c
)

if(ARCH STREQUAL "i386")
list(APPEND SOURCE
config/i386/cmhardwr.c
)
elseif(ARCH STREQUAL "amd64")
list(APPEND SOURCE
config/i386/cmhardwr.c
)
elseif(ARCH STREQUAL "arm")
list(APPEND SOURCE
config/arm/cmhardwr.c
)
endif()
5 changes: 5 additions & 0 deletions ntoskrnl/dbgk/dbgk.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

list(APPEND SOURCE
dbgk/dbgkobj.c
dbgk/dbgkutil.c
)
48 changes: 48 additions & 0 deletions ntoskrnl/ex/ex.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@

list(APPEND SOURCE
ex/atom.c
ex/callback.c
ex/dbgctrl.c
ex/efi.c
ex/event.c
ex/evtpair.c
ex/exintrin.c
ex/fmutex.c
ex/handle.c
ex/harderr.c
ex/hdlsterm.c
ex/init.c
ex/interlocked.c
ex/keyedevt.c
ex/locale.c
ex/lookas.c
ex/mutant.c
ex/profile.c
ex/pushlock.c
ex/resource.c
ex/rundown.c
ex/sem.c
ex/shutdown.c
ex/sysinfo.c
ex/time.c
ex/timer.c
ex/uuid.c
ex/win32k.c
ex/work.c
ex/xipdisp.c
ex/zone.c
)

list(APPEND ASM_SOURCE ex/zw.S)

if(ARCH STREQUAL "i386")
list(APPEND ASM_SOURCE
ex/i386/fastinterlck_asm.S
ex/i386/ioport.S
)
elseif(ARCH STREQUAL "amd64")
elseif(ARCH STREQUAL "arm")
list(APPEND ASM_SOURCE
ex/arm/ioport.s
)
endif()
20 changes: 20 additions & 0 deletions ntoskrnl/fsrtl/fsrtl.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@

list(APPEND SOURCE
fsrtl/dbcsname.c
fsrtl/fastio.c
fsrtl/faulttol.c
fsrtl/filelock.c
fsrtl/filter.c
fsrtl/filtrctx.c
fsrtl/fsfilter.c
fsrtl/fsrtlpc.c
fsrtl/largemcb.c
fsrtl/mcb.c
fsrtl/name.c
fsrtl/notify.c
fsrtl/oplock.c
fsrtl/pnp.c
fsrtl/stackovf.c
fsrtl/tunnel.c
fsrtl/unc.c
)
7 changes: 7 additions & 0 deletions ntoskrnl/fstub/fstub.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

list(APPEND SOURCE
fstub/disksup.c
fstub/fstubex.c
fstub/halstub.c
fstub/translate.c
)
6 changes: 6 additions & 0 deletions ntoskrnl/inbv/inbv.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

list(APPEND SOURCE
inbv/bootanim.c
inbv/inbv.c
inbv/inbvport.c
)
43 changes: 43 additions & 0 deletions ntoskrnl/io/io.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@

list(APPEND SOURCE
io/iomgr/adapter.c
io/iomgr/arcname.c
io/iomgr/bootlog.c
io/iomgr/controller.c
io/iomgr/device.c
io/iomgr/deviface.c
io/iomgr/driver.c
io/iomgr/error.c
io/iomgr/file.c
io/iomgr/iocomp.c
io/iomgr/ioevent.c
io/iomgr/iofunc.c
io/iomgr/iomdl.c
io/iomgr/iomgr.c
io/iomgr/iorsrce.c
io/iomgr/iotimer.c
io/iomgr/iowork.c
io/iomgr/irp.c
io/iomgr/irq.c
io/iomgr/ramdisk.c
io/iomgr/rawfs.c
io/iomgr/remlock.c
io/iomgr/symlink.c
io/iomgr/util.c
io/iomgr/volume.c
io/pnpmgr/arbiters.c
io/pnpmgr/devaction.c
io/pnpmgr/devnode.c
io/pnpmgr/plugplay.c
io/pnpmgr/pnpdma.c
io/pnpmgr/pnpinit.c
io/pnpmgr/pnpirp.c
io/pnpmgr/pnpmap.c
io/pnpmgr/pnpmgr.c
io/pnpmgr/pnpnotify.c
io/pnpmgr/pnpreport.c
io/pnpmgr/pnpres.c
io/pnpmgr/pnproot.c
io/pnpmgr/pnputil.c
io/debug.c
)
16 changes: 16 additions & 0 deletions ntoskrnl/kd/kd.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@

if(ARCH STREQUAL "i386")
list(APPEND SOURCE kd/i386/kdserial.c)
elseif(ARCH STREQUAL "amd64")
list(APPEND SOURCE kd/i386/kdserial.c)
elseif(ARCH STREQUAL "arm")
list(APPEND SOURCE kd/arm/kdserial.c)
endif()

list(APPEND SOURCE
kd/kdio.c
kd/kdmain.c
kd/kdprompt.c
kd/kdps2kbd.c
kd/kdserial.c
kd/kdterminal.c)
24 changes: 24 additions & 0 deletions ntoskrnl/kd64/kd64.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@

list(APPEND SOURCE
kd64/kdapi.c
kd64/kdbreak.c
kd64/kddata.c
kd64/kdinit.c
kd64/kdlock.c
kd64/kdprint.c
kd64/kdtrap.c
)

if(ARCH STREQUAL "i386")
list(APPEND SOURCE
kd64/i386/kdx86.c
)
elseif(ARCH STREQUAL "amd64")
list(APPEND SOURCE
kd64/amd64/kdx64.c
)
elseif(ARCH STREQUAL "arm")
list(APPEND SOURCE
kd64/arm/kdarm.c
)
endif()
20 changes: 20 additions & 0 deletions ntoskrnl/kdbg/kdbg.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@

#add_definitions(-DKDBG)

if(ARCH STREQUAL "i386")
list(APPEND ASM_SOURCE kdbg/i386/kdb_help.S)
list(APPEND SOURCE kdbg/i386/i386-dis.c)
elseif(ARCH STREQUAL "amd64")
list(APPEND ASM_SOURCE kdbg/amd64/kdb_help.S)
list(APPEND SOURCE kdbg/i386/i386-dis.c)
elseif(ARCH STREQUAL "arm")
endif()

list(APPEND SOURCE
kdbg/kdbg.c
kdbg/kdb.c
kdbg/kdb_cli.c
kdbg/kdb_cmdhist.c
kdbg/kdb_expr.c
kdbg/kdb_print.c
kdbg/kdb_symbols.c)
89 changes: 89 additions & 0 deletions ntoskrnl/ke/ke.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@

list(APPEND SOURCE
ke/apc.c
ke/balmgr.c
ke/bug.c
ke/clock.c
ke/config.c
ke/devqueue.c
ke/dpc.c
ke/eventobj.c
ke/except.c
ke/freeze.c
ke/gate.c
ke/gmutex.c
ke/ipi.c
ke/krnlinit.c
ke/mutex.c
ke/procobj.c
ke/profobj.c
ke/queue.c
ke/semphobj.c
ke/spinlock.c
ke/thrdobj.c
ke/thrdschd.c
ke/time.c
ke/timerobj.c
ke/wait.c
)

if(ARCH STREQUAL "i386")
list(APPEND ASM_SOURCE
ke/i386/ctxswitch.S
ke/i386/trap.s
ke/i386/usercall_asm.S
ke/i386/zeropage.S
)
list(APPEND SOURCE
ke/i386/abios.c
ke/i386/cpu.c
ke/i386/context.c
ke/i386/exp.c
ke/i386/irqobj.c
ke/i386/kiinit.c
ke/i386/ldt.c
ke/i386/mtrr.c
ke/i386/patpge.c
ke/i386/thrdini.c
ke/i386/traphdlr.c
ke/i386/usercall.c
ke/i386/v86vdm.c
)
elseif(ARCH STREQUAL "amd64")
list(APPEND ASM_SOURCE
ke/amd64/boot.S
ke/amd64/ctxswitch.S
ke/amd64/trap.S
ke/amd64/usercall_asm.S
ke/amd64/zeropage.S
)
list(APPEND SOURCE
ke/amd64/context.c
ke/amd64/cpu.c
ke/amd64/except.c
ke/amd64/interrupt.c
ke/amd64/irql.c
ke/amd64/kiinit.c
ke/amd64/krnlinit.c
ke/amd64/spinlock.c
ke/amd64/thrdini.c
ke/amd64/stubs.c
ke/amd64/usercall.c
)
elseif(ARCH STREQUAL "arm")
list(APPEND ASM_SOURCE
ke/arm/boot.s
ke/arm/ctxswtch.s
ke/arm/stubs_asm.s
ke/arm/trap.s
)
list(APPEND SOURCE
ke/arm/cpu.c
ke/arm/exp.c
ke/arm/interrupt.c
ke/arm/kiinit.c
ke/arm/thrdini.c
ke/arm/trapc.c
ke/arm/usercall.c
)
endif()
11 changes: 11 additions & 0 deletions ntoskrnl/lpc/lpc.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

list(APPEND SOURCE
lpc/close.c
lpc/complete.c
lpc/connect.c
lpc/create.c
lpc/listen.c
lpc/port.c
lpc/reply.c
lpc/send.c
)
Loading

0 comments on commit 057445f

Please sign in to comment.