Added a recursive clean rule and cleaned up a few loose ends

svn path=/trunk/; revision=367
This commit is contained in:
Rex Jolliff 1999-04-03 23:43:27 +00:00
parent 0c6333ed01
commit 29b9e3f0b4
32 changed files with 609 additions and 335 deletions

View file

@ -1,8 +1,20 @@
all: args.exe #
#
#
OBJECTS= ../common/crt0.o args.o OBJECTS= ../common/crt0.o args.o
LIBS= ../../lib/kernel32/kernel32.a ../../lib/ntdll/ntdll.a LIBS= ../../lib/kernel32/kernel32.a ../../lib/ntdll/ntdll.a
all: args.exe
.phony: all
clean:
- $(RM) args.o
- $(RM) args.exe
- $(RM) args.sym
.phony: clean
args.exe: $(OBJECTS) $(LIBS) args.exe: $(OBJECTS) $(LIBS)
$(CC) -specs=../../specs $(OBJECTS) $(LIBS) -lgcc -o args.exe $(CC) -specs=../../specs $(OBJECTS) $(LIBS) -lgcc -o args.exe
$(NM) --numeric-sort args.exe > args.sym $(NM) --numeric-sort args.exe > args.sym

View file

@ -1,7 +1,18 @@
all: hello.exe #
#
#
OBJECTS = ../common/crt0.o hello.o OBJECTS = ../common/crt0.o hello.o
LIBS = ../../lib/kernel32/kernel32.a ../../lib/ntdll/ntdll.a LIBS = ../../lib/kernel32/kernel32.a ../../lib/ntdll/ntdll.a
CLEAN_FILES = hello.o hello.exe
all: hello.exe
clean: $(CLEAN_FILES:%=%_clean)
$(CLEAN_FILES:%=%_clean): %_clean:
- $(RM) $*
.phony: clean $(CLEAN_FILES:%=%_clean)
hello.exe: $(OBJECTS) $(LIBS) hello.exe: $(OBJECTS) $(LIBS)
$(LD) $(OBJECTS) $(LIBS) -o hello.exe $(LD) $(OBJECTS) $(LIBS) -o hello.exe

View file

@ -17,6 +17,14 @@ OBJECTS = ../common/crt0.o cmd.o attrib.o alias.o batch.o beep.o call.o \
LIBS= ../../lib/kernel32/kernel32.a ../../lib/ntdll/ntdll.a LIBS= ../../lib/kernel32/kernel32.a ../../lib/ntdll/ntdll.a
CLEAN_FILES = $(OBJECTS) cmd.exe cmd.sym
clean: $(CLEAN_FILES:%=%_clean)
$(CLEAN_FILES:%=%_clean): %_clean:
- $(RM) $*
.phony: clean $(CLEAN_FILES:%=%_clean)
cmd.bin: $(OBJECTS) cmd.bin: $(OBJECTS)
$(LD) -Ttext 0x10000 $(OBJECTS) $(LIBS) -o cmd.exe $(LD) -Ttext 0x10000 $(OBJECTS) $(LIBS) -o cmd.exe

View file

@ -1,7 +1,18 @@
all: shell.exe #
#
#
OBJECTS= ../common/crt0.o shell.o OBJECTS= ../common/crt0.o shell.o
LIBS= ../../lib/kernel32/kernel32.a ../../lib/ntdll/ntdll.a LIBS= ../../lib/kernel32/kernel32.a ../../lib/ntdll/ntdll.a
CLEAN_FILES= shell.o shell.exe shell.sym
all: shell.exe
clean: $(CLEAN_FILES:%=%_clean)
$(CLEAN_FILES:%=%_clean): %_clean:
- $(RM) $*
.phony: clean $(CLEAN_FILES:%=%_clean)
shell.exe: $(OBJECTS) $(LIBS) shell.exe: $(OBJECTS) $(LIBS)
$(CC) -specs=../../specs $(OBJECTS) $(LIBS) -lgcc -o shell.exe $(CC) -specs=../../specs $(OBJECTS) $(LIBS) -lgcc -o shell.exe

View file

@ -1,13 +1,21 @@
# #
# #
# #
OBJECTS = beep.o ../../../ntoskrnl/ntoskrnl.a OBJECTS = beep.o ../../../ntoskrnl/ntoskrnl.a
all: beep.sys all: beep.sys
.PHONY: all .PHONY: all
clean:
- $(RM) beep.o
- $(RM) junk.tmp
- $(RM) base.tmp
- $(RM) temp.exp
- $(RM) beep.sys
.phony: clean
beep.sys: $(OBJECTS) beep.sys: $(OBJECTS)
$(CC) -specs=../../svc_specs -mdll -o junk.tmp -Wl,--defsym,_end=end \ $(CC) -specs=../../svc_specs -mdll -o junk.tmp -Wl,--defsym,_end=end \
-Wl,--defsym,_edata=__data_end__ -Wl,--defsym,_etext=etext \ -Wl,--defsym,_edata=__data_end__ -Wl,--defsym,_etext=etext \

View file

@ -12,22 +12,6 @@
#include <internal/debug.h> #include <internal/debug.h>
#define IDMAP_BASE (0xd0000000) #define IDMAP_BASE (0xd0000000)
/*
* Return a linear address which can be used to access the physical memory
* starting at x
*/
extern inline unsigned int physical_to_linear(unsigned int x)
{
return(x+IDMAP_BASE);
}
extern inline unsigned int linear_to_physical(unsigned int x)
{
return(x-IDMAP_BASE);
}
#define VIDMEM_BASE 0xb8000 #define VIDMEM_BASE 0xb8000
#define NR_ROWS 50 #define NR_ROWS 50

View file

@ -0,0 +1,31 @@
#
#
#
OBJECTS = blue.o ../../../ntoskrnl/ntoskrnl.a
all: blue.sys
.phony: all
clean:
- $(RM) blue.o
- $(RM) junk.tmp
- $(RM) base.tmp
- $(RM) temp.exp
- $(RM) blue.sys
.phony: clean
blue.sys: $(OBJECTS)
$(CC) -specs=../../svc_specs -mdll -o junk.tmp -Wl,--defsym,_end=end \
-Wl,--defsym,_edata=__data_end__ -Wl,--defsym,_etext=etext \
-Wl,--base-file,base.tmp $(OBJECTS)
- $(RM) junk.tmp
$(DLLTOOL) --dllname blue.sys --base-file base.tmp \
--output-exp temp.exp
- $(RM) base.tmp
$(CC) --verbose -Wl,--image-base,0x10000 -Wl,-e,_DriverEntry@8 \
-specs=../../svc_specs -mdll -o blue.sys $(OBJECTS) -Wl,temp.exp
- $(RM) temp.exp

View file

@ -1,6 +1,20 @@
#
#
#
OBJECTS = ide.o ../../../ntoskrnl/ntoskrnl.a
all: ide.sys all: ide.sys
OBJECTS = ide.o ../../../ntoskrnl/ntoskrnl.a .phony: all
clean:
- $(RM) ide.o
- $(RM) junk.tmp
- $(RM) base.tmp
- $(RM) temp.exp
- $(RM) ide.sys
.phony: clean
ide.sys: $(OBJECTS) ide.sys: $(OBJECTS)
$(CC) -specs=../../svc_specs -mdll -o junk.tmp -Wl,--defsym,_end=end \ $(CC) -specs=../../svc_specs -mdll -o junk.tmp -Wl,--defsym,_end=end \
@ -13,3 +27,4 @@ ide.sys: $(OBJECTS)
$(CC) --verbose -Wl,--image-base,0x10000 -Wl,-e,_DriverEntry@8 \ $(CC) --verbose -Wl,--image-base,0x10000 -Wl,-e,_DriverEntry@8 \
-specs=../../svc_specs -mdll -o ide.sys $(OBJECTS) -Wl,temp.exp -specs=../../svc_specs -mdll -o ide.sys $(OBJECTS) -Wl,temp.exp
- $(RM) temp.exp - $(RM) temp.exp

View file

@ -1,6 +1,20 @@
#
#
#
OBJECTS = keyboard.o ../../../ntoskrnl/ntoskrnl.a
all: keyboard.sys all: keyboard.sys
OBJECTS = keyboard.o ../../../ntoskrnl/ntoskrnl.a .phony: all
clean:
- $(RM) keyboard.o
- $(RM) junk.tmp
- $(RM) base.tmp
- $(RM) temp.exp
- $(RM) keyboard.sys
.phony: clean
keyboard.sys: $(OBJECTS) keyboard.sys: $(OBJECTS)
$(CC) -specs=../../svc_specs -mdll -o junk.tmp -Wl,--defsym,_end=end \ $(CC) -specs=../../svc_specs -mdll -o junk.tmp -Wl,--defsym,_end=end \

View file

@ -1 +1,31 @@
#
#
#
OBJECTS= mouse.o ../../../ntoskrnl/ntoskrnl.a
all: mouse.o all: mouse.o
.phony: all
clean:
- $(RM) mouse.o
- $(RM) junk.tmp
- $(RM) base.tmp
- $(RM) temp.exp
- $(RM) mouse.sys
.phony: clean
mouse.sys: $(OBJECTS)
$(CC) -specs=../../svc_specs -mdll -o junk.tmp -Wl,--defsym,_end=end \
-Wl,--defsym,_edata=__data_end__ -Wl,--defsym,_etext=etext \
-Wl,--base-file,base.tmp $(OBJECTS)
- $(RM) junk.tmp
$(DLLTOOL) --dllname mouse.sys --base-file base.tmp \
--output-exp temp.exp
- $(RM) base.tmp
$(CC) --verbose -Wl,--image-base,0x10000 -Wl,-e,_DriverEntry@8 \
-specs=../../svc_specs -mdll -o mouse.sys $(OBJECTS) -Wl,temp.exp
- $(RM) temp.exp

View file

@ -1 +1,31 @@
all: null.o #
#
#
OBJECTS= null.o ../../../ntoskrnl/ntoskrnl.a
all: null.sys
.phony: all
clean:
- $(RM) null.o
- $(RM) junk.tmp
- $(RM) base.tmp
- $(RM) temp.exp
- $(RM) null.sys
.phony: clean
null.sys: $(OBJECTS)
$(CC) -specs=../../svc_specs -mdll -o junk.tmp -Wl,--defsym,_end=end \
-Wl,--defsym,_edata=__data_end__ -Wl,--defsym,_etext=etext \
-Wl,--base-file,base.tmp $(OBJECTS)
- $(RM) junk.tmp
$(DLLTOOL) --dllname null.sys --base-file base.tmp \
--output-exp temp.exp
- $(RM) base.tmp
$(CC) --verbose -Wl,--image-base,0x10000 -Wl,-e,_DriverEntry@8 \
-specs=../../svc_specs -mdll -o null.sys $(OBJECTS) -Wl,temp.exp
- $(RM) temp.exp

View file

@ -1 +1,31 @@
#
#
#
OBJECTS= parallel.o ../../../ntoskrnl/ntoskrnl.a
all: parallel.o all: parallel.o
.phony: all
clean:
- $(RM) parallel.o
- $(RM) junk.tmp
- $(RM) base.tmp
- $(RM) temp.exp
- $(RM) parallel.sys
.phony: clean
parallel.sys: $(OBJECTS)
$(CC) -specs=../../svc_specs -mdll -o junk.tmp -Wl,--defsym,_end=end \
-Wl,--defsym,_edata=__data_end__ -Wl,--defsym,_etext=etext \
-Wl,--base-file,base.tmp $(OBJECTS)
- $(RM) junk.tmp
$(DLLTOOL) --dllname parallel.sys --base-file base.tmp \
--output-exp temp.exp
- $(RM) base.tmp
$(CC) --verbose -Wl,--image-base,0x10000 -Wl,-e,_DriverEntry@8 \
-specs=../../svc_specs -mdll -o parallel.sys $(OBJECTS) -Wl,temp.exp
- $(RM) temp.exp

View file

@ -1,4 +1,33 @@
all: sdisk.o #
#
#
OBJECTS= sdisk.o ../../../ntoskrnl/ntoskrnl.a
all: sdisk.sys
.phony: all
clean:
- $(RM) sdisk.o
- $(RM) junk.tmp
- $(RM) base.tmp
- $(RM) temp.exp
- $(RM) sdisk.sys
.phony: clean
sdisk.sys: $(OBJECTS)
$(CC) -specs=../../svc_specs -mdll -o junk.tmp -Wl,--defsym,_end=end \
-Wl,--defsym,_edata=__data_end__ -Wl,--defsym,_etext=etext \
-Wl,--base-file,base.tmp $(OBJECTS)
- $(RM) junk.tmp
$(DLLTOOL) --dllname sdisk.sys --base-file base.tmp \
--output-exp temp.exp
- $(RM) base.tmp
$(CC) --verbose -Wl,--image-base,0x10000 -Wl,-e,_DriverEntry@8 \
-specs=../../svc_specs -mdll -o sdisk.sys $(OBJECTS) -Wl,temp.exp
- $(RM) temp.exp
WIN32_LEAN_AND_MEAN = yes WIN32_LEAN_AND_MEAN = yes
include ../../../rules.mak include ../../../rules.mak

View file

@ -1 +1,31 @@
#
#
#
OBJECTS= serial.o ../../../ntoskrnl/ntoskrnl.a
all: serial.o all: serial.o
.phony: all
clean:
- $(RM) serial.o
- $(RM) junk.tmp
- $(RM) base.tmp
- $(RM) temp.exp
- $(RM) serial.sys
.phony: clean
serial.sys: $(OBJECTS)
$(CC) -specs=../../svc_specs -mdll -o junk.tmp -Wl,--defsym,_end=end \
-Wl,--defsym,_edata=__data_end__ -Wl,--defsym,_etext=etext \
-Wl,--base-file,base.tmp $(OBJECTS)
- $(RM) junk.tmp
$(DLLTOOL) --dllname serial.sys --base-file base.tmp \
--output-exp temp.exp
- $(RM) base.tmp
$(CC) --verbose -Wl,--image-base,0x10000 -Wl,-e,_DriverEntry@8 \
-specs=../../svc_specs -mdll -o serial.sys $(OBJECTS) -Wl,temp.exp
- $(RM) temp.exp

View file

@ -1,2 +1,36 @@
#
#
#
OBJECTS= sound.o ../../../ntoskrnl/ntoskrnl.a
all: sound.sys
.phony: all
clean:
ifeq ($(DOSCLI),yes)
- $(RM) sound.o
- $(RM) junk.tmp
- $(RM) base.tmp
- $(RM) temp.exp
- $(RM) sound.sys
else
- $(RM) sound.o junk.tmp base.tmp temp.exp sound.sys
endif
.phony: clean
sound.sys: $(OBJECTS)
$(CC) -specs=../../svc_specs -mdll -o junk.tmp -Wl,--defsym,_end=end \
-Wl,--defsym,_edata=__data_end__ -Wl,--defsym,_etext=etext \
-Wl,--base-file,base.tmp $(OBJECTS)
- $(RM) junk.tmp
$(DLLTOOL) --dllname sound.sys --base-file base.tmp \
--output-exp temp.exp
- $(RM) base.tmp
$(CC) --verbose -Wl,--image-base,0x10000 -Wl,-e,_DriverEntry@8 \
-specs=../../svc_specs -mdll -o sound.sys $(OBJECTS) -Wl,temp.exp
sound.o: sound.c dsp.c mixer.c wave.h wave.c sound.o: sound.c dsp.c mixer.c wave.h wave.c
all: sound.o

View file

@ -1,8 +1,22 @@
#
#
#
OBJECTS= test.o ../../../ntoskrnl/ntoskrnl.a
all: test.sys all: test.sys
OBJECTS = test.o ../../../ntoskrnl/ntoskrnl.a .phony: all
clean:
- $(RM) test.o
- $(RM) test.a
- $(RM) junk.tmp
- $(RM) base.tmp
- $(RM) temp.exp
- $(RM) test.sys
.phony: clean
# --def test.def --def test.def
test.sys: test.o test.sys: test.o
$(DLLTOOL) --dllname test.sys --output-lib test.a $(DLLTOOL) --dllname test.sys --output-lib test.a
$(CC) -specs=$(KM_SPECS) -mdll -o junk.tmp -Wl,--defsym,_end=end \ $(CC) -specs=$(KM_SPECS) -mdll -o junk.tmp -Wl,--defsym,_end=end \
@ -12,5 +26,7 @@ test.sys: test.o
$(DLLTOOL) --dllname test.sys --base-file base.tmp \ $(DLLTOOL) --dllname test.sys --base-file base.tmp \
--output-exp temp.exp --output-exp temp.exp
- $(RM) base.tmp - $(RM) base.tmp
$(CC) --verbose -Wl,--image-base,0x10000 -Wl,-e,_DriverEntry -specs=$(KM_SPECS) -mdll -o test.sys $(OBJECTS) -Wl,temp.exp $(CC) --verbose -Wl,--image-base,0x10000 -Wl,-e,_DriverEntry -specs=$(KM_SPECS) \
-mdll -o test.sys $(OBJECTS) -Wl,temp.exp
- $(RM) temp.exp - $(RM) temp.exp

View file

@ -1,8 +1,27 @@
all: ext2fs.sys #
#
#
OBJECTS = super.o blockdev.o inode.o file.o dir.o rw.o \ OBJECTS = super.o blockdev.o inode.o file.o dir.o rw.o \
../../../ntoskrnl/ntoskrnl.a ../../../ntoskrnl/ntoskrnl.a
all: ext2fs.sys
.phony: all
clean:
- $(RM) super.o
- $(RM) blockdev.o
- $(RM) inode.o
- $(RM) file.o
- $(RM) dir.o
- $(RM) rw.o
- $(RM) junk.tmp
- $(RM) base.tmp
- $(RM) temp.exp
- $(RM) ext2fs.sys
.phony: clean
ext2fs.sys: $(OBJECTS) ext2fs.sys: $(OBJECTS)
$(CC) -specs=$(KM_SPECS) -mdll -o junk.tmp -Wl,--defsym,_end=end \ $(CC) -specs=$(KM_SPECS) -mdll -o junk.tmp -Wl,--defsym,_end=end \
-Wl,--defsym,_edata=__data_end__ -Wl,--defsym,_etext=etext \ -Wl,--defsym,_edata=__data_end__ -Wl,--defsym,_etext=etext \
@ -14,3 +33,4 @@ ext2fs.sys: $(OBJECTS)
$(CC) --verbose -Wl,--image-base,0x10000 -Wl,-e,_DriverEntry \ $(CC) --verbose -Wl,--image-base,0x10000 -Wl,-e,_DriverEntry \
-specs=$(KM_SPECS) -mdll -o ext2fs.sys $(OBJECTS) -Wl,temp.exp -specs=$(KM_SPECS) -mdll -o ext2fs.sys $(OBJECTS) -Wl,temp.exp
$(RM) temp.exp $(RM) temp.exp

View file

@ -1,9 +1,40 @@
#
#
#
OBJECTS = block.o rw.o inode.o dir.o mount.o blockdev.o OBJECTS = block.o rw.o inode.o dir.o mount.o blockdev.o
all: minix.o all: minix.o
.phony: all
clean:
- $(RM) minix.o
- $(RM) rw.o
- $(RM) inode.o
- $(RM) dir.o
- $(RM) mount.o
- $(RM) blockdev.o
- $(RM) junk.tmp
- $(RM) base.tmp
- $(RM) temp.exp
- $(RM) minix.sys
.phony: clean
minix.o: $(OBJECTS) minix.o: $(OBJECTS)
$(LD) -r $(OBJECTS) -o minix.o $(LD) -r $(OBJECTS) -o minix.o
minix.sys: $(OBJECTS)
$(CC) -specs=../../svc_specs -mdll -o junk.tmp -Wl,--defsym,_end=end \
-Wl,--defsym,_edata=__data_end__ -Wl,--defsym,_etext=etext \
-Wl,--base-file,base.tmp $(OBJECTS)
- $(RM) junk.tmp
$(DLLTOOL) --dllname minix.sys --base-file base.tmp \
--output-exp temp.exp
- $(RM) base.tmp
$(CC) --verbose -Wl,--image-base,0x10000 -Wl,-e,_DriverEntry@8 \
-specs=../../svc_specs -mdll -o minix.sys $(OBJECTS) -Wl,temp.exp
- $(RM) temp.exp
WIN32_LEAN_AND_MEAN = yes WIN32_LEAN_AND_MEAN = yes
include ../../../rules.mak include ../../../rules.mak

View file

@ -1,156 +0,0 @@
U _CbAcquireForRead
U _CbInitDccb
U _CbReleaseFromRead
U _DbgPrint
U _ExAllocatePool
U _ExFreePool
U _IoAttachDeviceToDeviceStack
U _IoBuildSynchronousFsdRequest
U _IoCallDriver
U _IoCompleteRequest
U _IoCreateDevice
U _IoGetCurrentIrpStackLocation
U _IoRegisterFileSystem
U _KeInitializeEvent
U _KeWaitForSingleObject
U _MmGetSystemAddressForMdl
U _RtlAnsiStringToUnicodeString
U _RtlCopyMemory
U _RtlInitAnsiString
U _wcschr
00000000 t .text
00000000 t LC0
00000000 t ___gnu_compiled_c
00000000 t gcc2_compiled.
00000008 t LC1
00000011 t LC2
00000022 T _MinixCheckPoint
0000004b t LC3
0000006c t _MinixGetBlock
000000b0 t L147
0000010a t L148
00000124 t L151
0000012b t L150
00000135 t LC4
00000143 t LC5
0000014d t LC6
00000155 t LC7
0000015d t LC8
00000196 T _MinixReadBlock
0000029c t .text
0000029c t LC0
0000029c t ___gnu_compiled_c
0000029c t gcc2_compiled.
000002a1 t LC1
000002aa t LC2
000002ce T _MinixWrite
00000319 t LC3
0000033d t LC4
0000035c t LC5
00000363 t LC6
00000388 t LC7
00000393 t LC8
000003ba T _MinixRead
00000492 t L151
000004a2 t L152
00000508 t L181
0000059e t L191
000005d1 t L153
000005d6 t L199
00000635 t L257
000006a1 t L228
000006bb t L256
000006c4 t .text
000006c4 T _MinixDeleteInode
000006c4 t ___gnu_compiled_c
000006c4 t gcc2_compiled.
0000071a t _MinixAllocateInode
00000778 t L167
000007c2 t L166
000007de t L165
000007e6 t L173
000007ee T _MinixNewInode
0000081a t L175
0000081c t L176
00000824 T _MinixWriteInode
000008a2 T _MinixReadInode
0000090c t .text
0000090c T _MinixCompareUnicodeStringToAnsi
0000090c t ___gnu_compiled_c
0000090c t gcc2_compiled.
00000920 t L140
00000936 t L141
0000093f t L142
0000094b t L139
00000950 t L144
00000958 t LC0
0000095e t LC1
00000967 t LC2
00000996 t LC3
0000099d t LC4
000009b2 t LC5
000009ca T _MinixDirLookup
00000a26 t L153
00000aa3 t L163
00000ad8 t L158
00000b68 t L152
00000b80 t L151
00000bb6 t L186
00000bde t L191
00000be6 t LC6
00000c1c t LC7
00000c2b t LC8
00000c3f t LC9
00000c5c T _MinixOpen
00000cc0 t L206
00000d26 t L205
00000d3d t L198
00000d43 t L237
00000d5c t L207
00000d6c t L208
00000da7 t L236
00000daf t LC10
00000dd4 T _MinixClose
00000e40 t LC11
00000e66 t LC12
00000e7a t LC13
00000e9a t LC14
00000ea6 T _MinixCreate
00000fa7 t L260
00000fc8 t .text
00000fc8 T _MinixMount
00000fc8 t ___gnu_compiled_c
00000fc8 t gcc2_compiled.
0000103b t LC0
0000106c T _MinixFileSystemControl
000010bc t L139
000010c1 t L140
000010e2 t LC1
000010f3 t LC2
00001102 T _DriverEntry
000011b1 t L142
000011b8 t .text
000011b8 T _MinixReadSector
000011b8 t ___gnu_compiled_c
000011b8 t gcc2_compiled.
00001232 t L140
00001252 t L141
00001258 t L143
0000125a t L142
00001262 T _MinixWriteSector
000012c3 t L145
000012ce t L146
000012d0 t L147
00002000 b .bss
00002000 b .bss
00002000 b .bss
00002000 b .bss
00002000 b .bss
00002000 d .data
00002000 d .data
00002000 d .data
00002000 d .data
00002000 d .data
00002000 d .data
00002000 b _DriverObject
00002004 b .bss

View file

@ -1,2 +1,17 @@
all: template.o #
#
#
OBJECTS = template.o
all: tfsd.o
.phony: all
clean:
- $(RM) template.o
- $(RM) tfsd.o
.phony: clean
tfsd.o: template.o
$(LD) -r template.o -o tfsd.o $(LD) -r template.o -o tfsd.o

View file

@ -1,6 +1,27 @@
#
#
#
OBJECTS = blockdev.o dir.o dirwr.o iface.o ../../../ntoskrnl/ntoskrnl.a
all: vfatfsd.sys all: vfatfsd.sys
OBJECTS = blockdev.o dir.o dirwr.o iface.o ../../../ntoskrnl/ntoskrnl.a .phony: all
clean:
ifeq ($(DOSCLI),yes)
- $(RM) blockdev.o
- $(RM) dir.o
- $(RM) dirwr.o
- $(RM) iface.o
- $(RM) junk.tmp
- $(RM) base.tmp
- $(RM) temp.exp
- $(RM) vfatfsd.sys
else
- $(RM) blockdev.o dir.o dirwr.o iface.o junk.tmp base.tmp temp.exp vfatfsd.sys
endif
.phony: clean
vfatfsd.sys: $(OBJECTS) vfatfsd.sys: $(OBJECTS)
$(CC) -specs=../../svc_specs -mdll -o junk.tmp -Wl,--defsym,_end=end \ $(CC) -specs=../../svc_specs -mdll -o junk.tmp -Wl,--defsym,_end=end \
@ -13,3 +34,5 @@ vfatfsd.sys: $(OBJECTS)
$(CC) --verbose -Wl,--image-base,0x10000 -Wl,-e,_DriverEntry@8 \ $(CC) --verbose -Wl,--image-base,0x10000 -Wl,-e,_DriverEntry@8 \
-specs=../../svc_specs -mdll -o vfatfsd.sys $(OBJECTS) -Wl,temp.exp -specs=../../svc_specs -mdll -o vfatfsd.sys $(OBJECTS) -Wl,temp.exp
- $(RM) temp.exp - $(RM) temp.exp

View file

@ -9,12 +9,19 @@ all: genntdll$(EXE_POSTFIX) $(NAPI_FILES)
$(NAPI_FILES): sysfuncs.lst genntdll$(EXE_POSTFIX) $(NAPI_FILES): sysfuncs.lst genntdll$(EXE_POSTFIX)
genntdll$(EXE_POSTFIX) sysfuncs.lst ../../lib/ntdll/napi.c ../../include/ntdll/napi.h genntdll$(EXE_POSTFIX) sysfuncs.lst ../../lib/ntdll/napi.c ../../include/ntdll/napi.h
# (rjj) i removed the following option from line below: -If:\gnu\mingw32\include
genntdll$(EXE_POSTFIX): genntdll.c genntdll$(EXE_POSTFIX): genntdll.c
$(NATIVE_CC) -If:\gnu\mingw32\include -g genntdll.c -o genntdll$(EXE_POSTFIX) $(NATIVE_CC) -g genntdll.c -o genntdll$(EXE_POSTFIX)
clean: clean:
- $(RM) ../../lib/ntdll/sysfuncs.lst - $(RM) genntdll$(EXE_POSTFIX)
ifeq ($(DOSCLI),yes)
- $(RM) ..\..\lib\ntdll\napi.c
- $(RM) ..\..\include\ntdll\napi.h
else
- $(RM) ../../lib/ntdll/napi.c
- $(RM) ../../include/ntdll/napi.h - $(RM) ../../include/ntdll/napi.h
endif
.PHONY: all clean .PHONY: all clean

View file

@ -0,0 +1,7 @@
kernel32.a
kernel32.dll
kernel32.lib
base.tmp
junk.tmp
temp.exp

View file

@ -58,6 +58,16 @@ OBJECTS = $(MISC_OBJECTS) $(FILE_OBJECTS) $(THREAD_OBJECTS) \
$(PROCESS_OBJECTS) $(STRING_OBJECTS) $(MEM_OBJECTS) \ $(PROCESS_OBJECTS) $(STRING_OBJECTS) $(MEM_OBJECTS) \
$(INTERNAL_OBJECTS) $(SYNCH_OBJECTS) $(EXCEPT_OBJECTS) $(INTERNAL_OBJECTS) $(SYNCH_OBJECTS) $(EXCEPT_OBJECTS)
ifeq ($(DOSCLI),yes)
CLEAN_FILES = except\*.o file\*.o internal\*.o mem\*.o misc\*.o nls\*.o \
process\*.o string\*.o synch\*.o thread\*.o \
kernel32.o kernel32.a junk.tmp base.tmp temp.exp kernel32.dll kernel32.sym
else
CLEAN_FILES = except/*.o file/*.o internal/*.o mem/*.o misc/*.o nls/*.o \
process/*.o string/*.o synch/*.o thread/*.o \
kernel32.o kernel32.a junk.tmp base.tmp temp.exp kernel32.dll kernel32.sym
endif
kernel32.a: $(OBJECTS) kernel32.a: $(OBJECTS)
$(AR) csr kernel32.a $(OBJECTS) $(AR) csr kernel32.a $(OBJECTS)
@ -79,4 +89,11 @@ kernel32.dll: $(DLLMAIN) $(OBJECTS) kernel32.def
- $(RM) temp.exp - $(RM) temp.exp
$(NM) --numeric-sort kernel32.dll > kernel32.sym $(NM) --numeric-sort kernel32.dll > kernel32.sym
clean: $(CLEAN_FILES:%=%_clean)
$(CLEAN_FILES:%=%_clean): %_clean:
- $(RM) $*
.PHONY: clean $(CLEAN_FILES:%=%_clean)
include ../../rules.mak include ../../rules.mak

View file

@ -1,4 +1,5 @@
napi.asm napi.asm
napi.c
ntdll.lib ntdll.lib
base.tmp base.tmp
junk.tmp junk.tmp

View file

@ -20,6 +20,13 @@ OBJECTS = napi.o ldr/startup.o rtl/largeint.o rtl/namespc.o rtl/unicode.o \
string/strlen.o string/strncmp.o string/strncpy.o string/strnlen.o \ string/strlen.o string/strncmp.o string/strncpy.o string/strnlen.o \
string/strrchr.o string/wstring.o stubs/stubs.o rtl/heap.o \ string/strrchr.o string/wstring.o stubs/stubs.o rtl/heap.o \
rtl/critical.o rtl/mem.o ldr/utils.o rtl/critical.o rtl/mem.o ldr/utils.o
ifeq ($(DOSCLI),yes)
CLEAN_FILES = napi.o ldr\*.o rtl\*.o stdio\*.o string\*.o stubs\*.o ntdll.a \
main\dllmain.o ntdll.o ntdll.dll junk.tmp base.tmp temp.exp ntdll.sym
else
CLEAN_FILES = napi.o ldr/*.o rtl/*.o stdio/*.o string/*.o stubs/*.o ntall.a \
main/dllmain.o ntdll.o ntdll.dll junk.tmp base.tmp temp.exp ntdll.sym
endif
ntdll.a: $(OBJECTS) ntdll.a: $(OBJECTS)
$(AR) csr ntdll.a $(OBJECTS) $(AR) csr ntdll.a $(OBJECTS)
@ -43,5 +50,13 @@ ntdll.dll: $(DLLMAIN) $(OBJECTS)
- $(RM) temp.exp - $(RM) temp.exp
$(NM) --numeric-sort ntdll.dll > ntdll.sym $(NM) --numeric-sort ntdll.dll > ntdll.sym
clean: $(CLEAN_FILES:%=%_clean)
$(CLEAN_FILES:%=%_clean): %_clean:
- $(RM) $*
.PHONY: clean $(CLEAN_FILES:%=%_clean)
#WARNINGS_ARE_ERRORS = yes #WARNINGS_ARE_ERRORS = yes
include ../../rules.mak include ../../rules.mak

View file

@ -6,3 +6,10 @@ all: loadros.com
loadros.com: loadros.asm loadros.com: loadros.asm
nasm -fbin loadros.asm -o loadros.com nasm -fbin loadros.asm -o loadros.com
clean:
- $(RM) loadros.com
.PHONY: clean
include ../../rules.mak

View file

@ -5,22 +5,17 @@
# #
# Select your host # Select your host
# #
#HOST = djgpp-linux
#HOST = mingw32-linux #HOST = mingw32-linux
#HOST = djgpp-msdos
HOST = mingw32-windows HOST = mingw32-windows
ifeq ($(HOST),mingw32-windows)
TOPDIR := /TEMP/M32/REACTOS
endif
include rules.mak include rules.mak
# #
# Required to run the system # Required to run the system
# #
# crtdll mingw32 COMPONENTS = iface_native ntoskrnl
COMPONENTS = iface_native ntoskrnl ntdll kernel32 DLLS = ntdll kernel32
#DLLS = crtdll mingw32
# #
# Select the server(s) you want to build # Select the server(s) you want to build
@ -31,20 +26,24 @@ SERVERS = win32 posix linux os2
# Select the loader(s) you want to build # Select the loader(s) you want to build
# #
LOADERS = dos LOADERS = dos
# LOADERS = boot
# #
# Select the device drivers and filesystems you want # Select the device drivers and filesystems you want
# #
KERNEL_SERVICES = blue parallel keyboard null mouse serial sound ide test sdisk \ DEVICE_DRIVERS = blue ide keyboard mouse null parallel sdisk serial
minix vfat # DEVICE_DRIVERS = beep event floppy ide_test sound test test1
FS_DRIVERS = minix vfat ext2
# FS_DRIVERS = template
KERNEL_SERVICES = $(DEVICE_DRIVERS) $(FS_DRIVERS)
# cmd APPS = args hello shell
APPS = hello shell cmd # APPS = cmd
all: $(COMPONENTS) $(LOADERS) $(KERNEL_SERVICES) $(APPS) all: $(COMPONENTS) $(DLLS) $(LOADERS) $(KERNEL_SERVICES) $(APPS)
.PHONY: all .PHONY: all
clean: $(COMPONENTS:%=%_clean) $(LOADERS:%=%_clean) \ clean: $(COMPONENTS:%=%_clean) $(DLLS:%=%_clean) $(LOADERS:%=%_clean) \
$(KERNEL_SERVICES:%=%_clean) $(APPS:%=%_clean) $(KERNEL_SERVICES:%=%_clean) $(APPS:%=%_clean)
.PHONY: clean .PHONY: clean
@ -57,7 +56,7 @@ $(APPS): %:
$(APPS:%=%_clean): %_clean: $(APPS:%=%_clean): %_clean:
make -C apps/$* clean make -C apps/$* clean
.PHONY: $(APPS:%=%) $(APPS:%=%_clean) .PHONY: $(APPS) $(APPS:%=%_clean)
# #
# Interfaces # Interfaces
@ -73,75 +72,56 @@ iface_native_clean:
# #
# Device driver rules # Device driver rules
# #
vfat: dummy $(DEVICE_DRIVERS): %:
make -C services/fs/vfat make -C services/dd/$*
sdisk: dummy $(DEVICE_DRIVERS:%=%_clean): %_clean:
make -C services/dd/sdisk make -C services/dd/$* clean
minix: dummy .PHONY: $(DEVICE_DRIVERS) $(DEVICE_DRIVERS:%=%_clean)
make -C services/fs/minix
template: dummy $(FS_DRIVERS): %:
make -C services/fs/template make -C services/fs/$*
ide-test: dummy $(FS_DRIVERS:%=%_clean): %_clean:
make -C services/dd/ide-test make -C services/fs/$* clean
ide: dummy .PHONY: $(FS_DRIVERS) $(FS_DRIVERS:%=%_clean)
make -C services/dd/ide
test: dummy
make -C services/dd/test
test1: dummy
make -C services/dd/test1
null: dummy
make -C services/dd/null
parallel: dummy
make -C services/dd/parallel
keyboard: dummy
make -C services/dd/keyboard
blue: dummy
make -C services/dd/blue --file=makefile
mouse: dummy
make -C services/dd/mouse
serial: dummy
make -C services/dd/serial
sound: dummy
make -C services/dd/sound
# #
# Kernel loaders # Kernel loaders
# #
dos: dummy $(LOADERS): %:
make -C loaders/dos make -C loaders/$*
$(LOADERS:%=%_clean): %_clean:
make -C loaders/$* clean
.PHONY: $(LOADERS) $(LOADERS:%=%_clean)
# #
# Required system components # Required system components
# #
ntoskrnl: dummy ntoskrnl:
make -C ntoskrnl make -C ntoskrnl
kernel32: dummy ntoskrnl_clean:
make -C lib/kernel32 make -C ntoskrnl clean
ntdll: dummy .PHONY: ntoskrnl ntoskrnl_clean
make -C lib/ntdll
crtdll: dummy #
make -C lib/crtdll # Required DLLs
#
$(DLLS): %:
make -C lib/$*
$(DLLS:%=%_clean): %_clean:
make -C lib/$* clean
.PHONY: $(DLLS) $(DLLS:%=%_clean)
mingw32: dummy
make -C lib/mingw32
dummy:

View file

@ -14,7 +14,9 @@ include rules.mak
# #
# Required to run the system # Required to run the system
# #
COMPONENTS = iface_native ntoskrnl ntdll kernel32 COMPONENTS = iface_native ntoskrnl
DLLS = ntdll kernel32
#DLLS = crtdll mingw32
# #
# Select the server(s) you want to build # Select the server(s) you want to build
@ -25,117 +27,102 @@ SERVERS = win32 posix linux os2
# Select the loader(s) you want to build # Select the loader(s) you want to build
# #
LOADERS = dos LOADERS = dos
# LOADERS = boot
# #
# Select the device drivers and filesystems you want # Select the device drivers and filesystems you want
# #
KERNEL_SERVICES = parallel keyboard blues null mouse serial ide \ DEVICE_DRIVERS = blue ide keyboard mouse null parallal serial
minix vfat ext2 # DEVICE_DRIVERS = beep event floppy ide_test sound test test1
FS_DRIVERS = minix vfat ext2
# FS_DRIVERS = template
KERNEL_SERVICES = $(DEVICE_DRIVERS) $(FS_DRIVERS)
APPS = hello shell args APPS = args hello shell
# APPS = cmd
all: $(COMPONENTS) $(LOADERS) $(KERNEL_SERVICES) $(APPS) all: $(COMPONENTS) $(DLLS) $(LOADERS) $(KERNEL_SERVICES) $(APPS)
.PHONY: all
clean: dummy clean: $(COMPONENTS:%=%_clean) $(DLLS:%=%_clean) $(LOADERS:%=%_clean) \
make -C iface/native clean $(KERNEL_SERVICES:%=%_clean) $(APPS:%=%_clean)
.PHONY: clean
# #
# Applications # Applications
# #
hello: dummy $(APPS): %:
make -C apps/hello make -C apps/$*
args: dummy $(APPS:%=%_clean): %_clean:
make -C apps/args make -C apps/$* clean
cmd: dummy .PHONY: $(APPS) $(APPS:%=%_clean)
make -C apps/cmd
shell: dummy
make -C apps/shell
# #
# Interfaces # Interfaces
# #
iface_native: dummy iface_native:
make -C iface/native make -C iface/native
iface_native_clean:
make -C iface/native clean
.PHONY: iface_native iface_native_clean
# #
# Device driver rules # Device driver rules
# #
vfat: dummy $(DEVICE_DRIVERS): %:
make -C services/fs/vfat make -C services/dd/$*
sdisk: dummy
make -C services/dd/sdisk
minix: dummy
make -C services/fs/minix
template: dummy
make -C services/fs/template
$(DEVICE_DRIVERS:%=%_clean): %_clean:
make -C services/dd/$* clean
ide-test: dummy .PHONY: $(DEVICE_DRIVERS) $(DEVICE_DRIVERS:%=%_clean)
make -C services/dd/ide-test
ide: dummy $(FS_DRIVERS): %:
make -C services/dd/ide make -C services/fs/$*
test: dummy $(FS_DRIVERS:%=%_clean): %_clean:
make -C services/dd/test make -C services/fs/$* clean
test1: dummy .PHONY: $(FS_DRIVERS) $(FS_DRIVERS:%=%_clean)
make -C services/dd/test1
null: dummy
make -C services/dd/null
parallel: dummy
make -C services/dd/parallel
keyboard: dummy
make -C services/dd/keyboard
blues: dummy
make -C services/dd/blue
mouse: dummy
make -C services/dd/mouse
serial: dummy
make -C services/dd/serial
sound: dummy
make -C services/dd/sound
ext2: dummy
make -C services/fs/ext2
# #
# Kernel loaders # Kernel loaders
# #
dos: dummy $(LOADERS): %:
make -C loaders/dos make -C loaders/$*
$(LOADERS:%=%_clean): %_clean:
make -C loaders/$* clean
.PHONY: $(LOADERS) $(LOADERS:%=%_clean)
# #
# Required system components # Required system components
# #
ntoskrnl: dummy ntoskrnl:
make -C ntoskrnl make -C ntoskrnl
kernel32: dummy ntoskrnl_clean:
make -C lib/kernel32 make -C ntoskrnl clean
ntdll: dummy .PHONY: ntoskrnl ntoskrnl_clean
make -C lib/ntdll
crtdll: dummy #
make -C lib/crtdll # Required DLLs
#
$(DLLS): %:
make -C lib/$*
$(DLLS:%=%_clean): %_clean:
make -C lib/$* clean
.PHONY: $(DLLS) $(DLLS:%=%_clean)
mingw32: dummy
make -C lib/mingw32
dummy:

View file

@ -102,6 +102,18 @@ OBJECTS = objects/hal.o objects/ke.o objects/rtl.o objects/mm.o \
objects/se.o objects/cm.o objects/dbg.o\ objects/se.o objects/cm.o objects/dbg.o\
objects/nt.o objects/cc.o objects/ldr.o objects/nt.o objects/cc.o objects/ldr.o
ifeq ($(DOSCLI),yes)
CLEAN_FILES = objects\*.o cc\*.o cm\*.o dbg\*.o ex\*.o hal\x86\*.o io\*.o \
ke\*.o ldr\*.o mm\*.o nt\*.o ob\*.o ps\*.o rtl\*.o se\*.o \
utils\export\export.exe ntoskrnl.o ntoskrnl.a junk.tmp base.tmp \
temp.exp ntoskrnl.exe ntoskrnl.sym
else
CLEAN_FILES = objects/*.o cc/*.o cm/*.o dbg/*.o ex/*.o hal/x86/*.o io/*.o \
ke/*.o ldr/*.o mm/*.o nt/*.o ob/*.o ps/*.o rtl/*.o se/*.o \
utils/export/export ntoskrnl.o ntoskrnl.a junk.tmp base.tmp \
temp.exp ntoskrnl.exe ntoskrnl.sym
endif
utils/export/export$(EXE_POSTFIX): utils/export/export.c utils/export/export$(EXE_POSTFIX): utils/export/export.c
$(NATIVE_CC) -g utils/export/export.c -o utils/export/export$(EXE_POSTFIX) $(NATIVE_CC) -g utils/export/export.c -o utils/export/export$(EXE_POSTFIX)
@ -137,8 +149,13 @@ ntoskrnl.exe: $(OBJECTS) ntoskrnl.def
-Wl,--defsym,_etext=etext -Wl,temp.exp -Wl,--defsym,_etext=etext -Wl,temp.exp
- $(RM) temp.exp - $(RM) temp.exp
$(NM) --numeric-sort ntoskrnl.exe > ntoskrnl.sym $(NM) --numeric-sort ntoskrnl.exe > ntoskrnl.sym
dummy: clean: $(CLEAN_FILES:%=%_clean)
$(CLEAN_FILES:%=%_clean): %_clean:
- $(RM) $*
.PHONY: clean $(CLEAN_FILES:%=%_clean)
ex/napi.o: ex/napi.c ../include/ntdll/napi.h ex/napi.o: ex/napi.c ../include/ntdll/napi.h
@ -146,3 +163,4 @@ ex/napi.o: ex/napi.c ../include/ntdll/napi.h
WIN32_LEAN_AND_MEAN = yes WIN32_LEAN_AND_MEAN = yes
#WARNINGS_ARE_ERRORS = yes #WARNINGS_ARE_ERRORS = yes
include ../rules.mak include ../rules.mak

View file

@ -27,8 +27,9 @@ EXE_POSTFIX = .exe
CP = copy CP = copy
DLLTOOL = $(PREFIX)dlltool --as=$(PREFIX)as DLLTOOL = $(PREFIX)dlltool --as=$(PREFIX)as
NASM_CMD = nasm NASM_CMD = nasm
RM = DELETE RM = del
KM_SPECS = specs KM_SPECS = specs
DOSCLI = yes
endif endif
# #

View file

@ -17,6 +17,14 @@ OBJECTS = ../common/crt0.o cmd.o attrib.o alias.o batch.o beep.o call.o \
LIBS= ../../lib/kernel32/kernel32.a ../../lib/ntdll/ntdll.a LIBS= ../../lib/kernel32/kernel32.a ../../lib/ntdll/ntdll.a
CLEAN_FILES = $(OBJECTS) cmd.exe cmd.sym
clean: $(CLEAN_FILES:%=%_clean)
$(CLEAN_FILES:%=%_clean): %_clean:
- $(RM) $*
.phony: clean $(CLEAN_FILES:%=%_clean)
cmd.bin: $(OBJECTS) cmd.bin: $(OBJECTS)
$(LD) -Ttext 0x10000 $(OBJECTS) $(LIBS) -o cmd.exe $(LD) -Ttext 0x10000 $(OBJECTS) $(LIBS) -o cmd.exe