Subversion Repositories Kolibri OS

Compare Revisions

Ignore whitespace Rev 5038 → Rev 5039

/data/common/pestrip.asm
0,0 → 1,116
; If you know macro language of FASM, there is almost nothing to comment here.
; If you don't know macro language of FASM, comments would not help you.
 
filename equ '%EXENAME%'
 
SPE_DIR_ORDER fix IMPORT EXPORT BASERELOC EXCEPTION TLS BOUND_IMPORT RESOURCE
count = 0
irps dir,SPE_DIR_ORDER
{
SPE_DIRECTORY_#dir = count
count = count + 1
}
 
IMAGE_DIRECTORY_ENTRY_EXPORT = 0
IMAGE_DIRECTORY_ENTRY_IMPORT = 1
IMAGE_DIRECTORY_ENTRY_RESOURCE = 2
IMAGE_DIRECTORY_ENTRY_EXCEPTION = 3
IMAGE_DIRECTORY_ENTRY_BASERELOC = 5
IMAGE_DIRECTORY_ENTRY_TLS = 9
IMAGE_DIRECTORY_ENTRY_BOUND_IMPORT = 11
 
virtual at 0
file filename:3Ch,4
load pehea dword from 0
end virtual
 
virtual at 0
file filename:pehea,0F8h
load NumberOfSections word from 6
load SizeOfOptionalHeader word from 14h
if SizeOfOptionalHeader<>0E0h
error Nonstandard PE header
end if
load Characteristics word from 16h
load AddressOfEntryPoint dword from 28h
load ImageBase dword from 34h
load SectionAlignment dword from 38h
load FileAlignment dword from 3Ch
load MajorOperatingSystemVersion word from 40h
load MinorOperatingSystemVersion word from 42h
load MajorSubsystemVersion word from 48h
load MinorSubsystemVersion word from 4Ah
load SizeOfImage dword from 50h
load SizeOfHeaders dword from 54h
load Subsystem word from 5Ch
load SizeOfStackReserve dword from 60h
load SizeOfHeapReserve dword from 68h
load SrcNumberOfRvaAndSizes dword from 74h
 
DstNumberOfRvaAndSizes = 0
irps dir,SPE_DIR_ORDER
{
if IMAGE_DIRECTORY_ENTRY_#dir < SrcNumberOfRvaAndSizes
load DirRVA_#dir dword from 78h + 8*IMAGE_DIRECTORY_ENTRY_#dir
load DirSize_#dir dword from 7Ch + 8*IMAGE_DIRECTORY_ENTRY_#dir
else
DirRVA_#dir = 0
DirSize_#dir = 0
end if
if DirRVA_#dir > 0 & DirSize_#dir > 0
DstNumberOfRvaAndSizes = SPE_DIRECTORY_#dir + 1
end if
}
 
end virtual
 
SectionAlignmentLog = 0
while SectionAlignment <> 1 shl SectionAlignmentLog
SectionAlignmentLog = SectionAlignmentLog + 1
end while
FileAlignmentLog = 0
while FileAlignment <> 1 shl FileAlignmentLog
FileAlignmentLog = FileAlignmentLog + 1
end while
 
; header
dw 'PE' xor 'S' ; Signature
dw Characteristics or 0x100 ; IMAGE_FILE_32BIT_MACHINE
dd AddressOfEntryPoint
dd ImageBase
db SectionAlignmentLog
db FileAlignmentLog
db MajorSubsystemVersion
db MinorSubsystemVersion
dd SizeOfImage
dd SizeOfStackReserve
dd SizeOfHeapReserve
SizeOfHeadersField:
dd 0
db Subsystem
db DstNumberOfRvaAndSizes
dw NumberOfSections
; directories
irps dir,SPE_DIR_ORDER
{
if SPE_DIRECTORY_#dir < DstNumberOfRvaAndSizes
dd DirRVA_#dir, DirSize_#dir
end if
}
 
NumBytesDeleted = pehea + 0F8h - $ + NumberOfSections*0Ch
DeltaDeleted = NumBytesDeleted and not (FileAlignment - 1)
; Use store instead of declaring SizeOfHeaders - DeltaDeleted directly in dd
; to avoid the second compilation pass.
store dword SizeOfHeaders - DeltaDeleted at SizeOfHeadersField
; sections
repeat NumberOfSections
file filename:pehea+0F8h+(%-1)*28h,18h
load a dword from $-4
store dword a-DeltaDeleted at $-4
file filename:pehea+0F8h+(%-1)*28h+24h,4
end repeat
; padding to keep FileAlignment
times NumBytesDeleted - DeltaDeleted db 0
; data
file filename:pehea+0F8h+NumberOfSections*28h
/data/eng/Makefile
135,24 → 135,10
drivers/usbhid.obj:DRIVERS/USBHID.OBJ:$(KERNEL)/drivers/usbhid/usbhid.asm \
drivers/usbstor.obj:DRIVERS/USBSTOR.OBJ:$(KERNEL)/drivers/usbstor.asm \
drivers/vt823x.obj:DRIVERS/VT823X.OBJ:$(KERNEL)/drivers/vt823x.asm \
drivers/vidintel.obj:DRIVERS/VIDINTEL.OBJ:$(KERNEL)/drivers/vidintel.asm \
drivers/3c59x.obj:DRIVERS/3C59X.OBJ:$(REPOSITORY)/drivers/ethernet/3c59x.asm \
drivers/dec21x4x.obj:DRIVERS/DEC21X4X.OBJ:$(REPOSITORY)/drivers/ethernet/dec21x4x.asm \
drivers/forcedeth.sys:DRIVERS/FORCEDETH.SYS:$(REPOSITORY)/drivers/ethernet/forcedeth.asm \
drivers/i8254x.sys:DRIVERS/I8254X.SYS:$(REPOSITORY)/drivers/ethernet/i8254x.asm \
drivers/i8255x.sys:DRIVERS/I8255X.SYS:$(REPOSITORY)/drivers/ethernet/i8255x.asm \
drivers/mtd80x.sys:DRIVERS/MTD80X.SYS:$(REPOSITORY)/drivers/ethernet/mtd80x.asm \
drivers/pcnet32.sys:DRIVERS/PCNET32.SYS:$(REPOSITORY)/drivers/ethernet/pcnet32.asm \
drivers/r6040.sys:DRIVERS/R6040.SYS:$(REPOSITORY)/drivers/ethernet/R6040.asm \
drivers/rhine.sys:DRIVERS/RHINE.SYS:$(REPOSITORY)/drivers/ethernet/rhine.asm \
drivers/rtl8029.sys:DRIVERS/RTL8029.SYS:$(REPOSITORY)/drivers/ethernet/RTL8029.asm \
drivers/rtl8139.obj:DRIVERS/RTL8139.OBJ:$(REPOSITORY)/drivers/ethernet/RTL8139.asm \
drivers/rtl8169.obj:DRIVERS/RTL8169.OBJ:$(REPOSITORY)/drivers/ethernet/RTL8169.asm \
drivers/sis900.sys:DRIVERS/SIS900.SYS:$(REPOSITORY)/drivers/ethernet/sis900.asm \
drivers/uhci.sys:DRIVERS/UHCI.SYS:$(REPOSITORY)/drivers/usb/uhci.asm \
drivers/ohci.sys:DRIVERS/OHCI.SYS:$(REPOSITORY)/drivers/usb/ohci.asm \
drivers/ehci.sys:DRIVERS/EHCI.SYS:$(REPOSITORY)/drivers/usb/ehci.asm \
drivers/rdc.sys:DRIVERS/RDC.SYS:$(REPOSITORY)/drivers/video/rdc.asm \
File|Managers/kfar:File|Managers/KFAR:$(PROGS)/fs/kfar/trunk/kfar.asm \
File|Managers/kfm:File|Managers/KFM:$(PROGS)/fs/kfm/trunk/kfm.asm \
File|Managers/opendial:File|Managers/OPENDIAL:$(PROGS)/fs/opendial/opendial.asm \
212,6 → 198,23
network/ircc:NETWORK/IRCC:$(PROGS)/network/ircc/ircc.asm \
network/downloader:NETWORK/DOWNLOADER:$(PROGS)/network/downloader/downloader.asm \
# end of list
# Same as above with PE stripping as extra step.
FASM_PROGRAMS_PESTRIP:=\
drivers/vidintel.sys:DRIVERS/VIDINTEL.SYS:$(REPOSITORY)/drivers/vidintel.asm \
drivers/forcedeth.sys:DRIVERS/FORCEDETH.SYS:$(REPOSITORY)/drivers/ethernet/forcedeth.asm \
drivers/i8254x.sys:DRIVERS/I8254X.SYS:$(REPOSITORY)/drivers/ethernet/i8254x.asm \
drivers/i8255x.sys:DRIVERS/I8255X.SYS:$(REPOSITORY)/drivers/ethernet/i8255x.asm \
drivers/mtd80x.sys:DRIVERS/MTD80X.SYS:$(REPOSITORY)/drivers/ethernet/mtd80x.asm \
drivers/pcnet32.sys:DRIVERS/PCNET32.SYS:$(REPOSITORY)/drivers/ethernet/pcnet32.asm \
drivers/r6040.sys:DRIVERS/R6040.SYS:$(REPOSITORY)/drivers/ethernet/R6040.asm \
drivers/rhine.sys:DRIVERS/RHINE.SYS:$(REPOSITORY)/drivers/ethernet/rhine.asm \
drivers/rtl8029.sys:DRIVERS/RTL8029.SYS:$(REPOSITORY)/drivers/ethernet/RTL8029.asm \
drivers/sis900.sys:DRIVERS/SIS900.SYS:$(REPOSITORY)/drivers/ethernet/sis900.asm \
drivers/uhci.sys:DRIVERS/UHCI.SYS:$(REPOSITORY)/drivers/usb/uhci.asm \
drivers/ohci.sys:DRIVERS/OHCI.SYS:$(REPOSITORY)/drivers/usb/ohci.asm \
drivers/ehci.sys:DRIVERS/EHCI.SYS:$(REPOSITORY)/drivers/usb/ehci.asm \
drivers/rdc.sys:DRIVERS/RDC.SYS:$(REPOSITORY)/drivers/video/rdc.asm \
# end of list
# The list of all FASM programs with one main FASM file for CD image.
# Format of an item is exactly the same as in the previous list.
FASM_PROGRAMS_CD:=\
448,9 → 451,15
fsource=$(call respace,$(call sourcepart,$(f)))
fparam=$(call respace,$(call parampart,$(f)))
 
# Add stripped PE files produced by fasm to FASM_NOKPACK_PROGRAMS.
include Makefile.pestrip
FASM_NOKPACK_PROGRAMS:=$(FASM_NOKPACK_PROGRAMS) \
$(foreach f,$(FASM_PROGRAMS_PESTRIP),$(fbinary).full:-:$(fsource))
$(foreach f,$(FASM_PROGRAMS_PESTRIP),$(eval $(call pestrip_meta_rule,$(fbinary),$(fbinary).full)))
 
# Define targets for image file.
# Join all the lists above.
targets_full:=$(COPY_FILES) $(FASM_PROGRAMS) $(NASM_PROGRAMS) $(OTHER_FILES) $(CMM_PROGRAMS)
targets_full:=$(COPY_FILES) $(FASM_PROGRAMS) $(FASM_PROGRAMS_PESTRIP) $(NASM_PROGRAMS) $(OTHER_FILES) $(CMM_PROGRAMS)
# For each item in the united list call fbinary.
targets:=$(foreach f,$(targets_full),$(fbinary))
 
/data/eng/Makefile.pestrip
0,0 → 1,11
# This is not a independent Makefile; it is auxiliary file
# included from main Makefile.
 
# The arguments of macro pestrip_meta_rule:
# $(1) = name of stripped file,
# $(2) = name of input file
define pestrip_meta_rule
$(1): $(2) Makefile.pestrip
EXENAME="$$<" fasm ../common/pestrip.asm "$$@"
kpack --nologo "$$@"
endef
/data/et/Makefile
135,24 → 135,10
drivers/usbhid.obj:DRIVERS/USBHID.OBJ:$(KERNEL)/drivers/usbhid/usbhid.asm \
drivers/usbstor.obj:DRIVERS/USBSTOR.OBJ:$(KERNEL)/drivers/usbstor.asm \
drivers/vt823x.obj:DRIVERS/VT823X.OBJ:$(KERNEL)/drivers/vt823x.asm \
drivers/vidintel.obj:DRIVERS/VIDINTEL.OBJ:$(KERNEL)/drivers/vidintel.asm \
drivers/3c59x.obj:DRIVERS/3C59X.OBJ:$(REPOSITORY)/drivers/ethernet/3c59x.asm \
drivers/dec21x4x.obj:DRIVERS/DEC21X4X.OBJ:$(REPOSITORY)/drivers/ethernet/dec21x4x.asm \
drivers/forcedeth.sys:DRIVERS/FORCEDETH.SYS:$(REPOSITORY)/drivers/ethernet/forcedeth.asm \
drivers/i8254x.sys:DRIVERS/I8254X.SYS:$(REPOSITORY)/drivers/ethernet/i8254x.asm \
drivers/i8255x.sys:DRIVERS/I8255X.SYS:$(REPOSITORY)/drivers/ethernet/i8255x.asm \
drivers/mtd80x.sys:DRIVERS/MTD80X.SYS:$(REPOSITORY)/drivers/ethernet/mtd80x.asm \
drivers/pcnet32.sys:DRIVERS/PCNET32.SYS:$(REPOSITORY)/drivers/ethernet/pcnet32.asm \
drivers/r6040.sys:DRIVERS/R6040.SYS:$(REPOSITORY)/drivers/ethernet/R6040.asm \
drivers/rhine.sys:DRIVERS/RHINE.SYS:$(REPOSITORY)/drivers/ethernet/rhine.asm \
drivers/rtl8029.sys:DRIVERS/RTL8029.SYS:$(REPOSITORY)/drivers/ethernet/RTL8029.asm \
drivers/rtl8139.obj:DRIVERS/RTL8139.OBJ:$(REPOSITORY)/drivers/ethernet/RTL8139.asm \
drivers/rtl8169.obj:DRIVERS/RTL8169.OBJ:$(REPOSITORY)/drivers/ethernet/RTL8169.asm \
drivers/sis900.sys:DRIVERS/SIS900.SYS:$(REPOSITORY)/drivers/ethernet/sis900.asm \
drivers/uhci.sys:DRIVERS/UHCI.SYS:$(REPOSITORY)/drivers/usb/uhci.asm \
drivers/ohci.sys:DRIVERS/OHCI.SYS:$(REPOSITORY)/drivers/usb/ohci.asm \
drivers/ehci.sys:DRIVERS/EHCI.SYS:$(REPOSITORY)/drivers/usb/ehci.asm \
drivers/rdc.sys:DRIVERS/RDC.SYS:$(REPOSITORY)/drivers/video/rdc.asm \
File|Managers/kfar:File|Managers/KFAR:$(PROGS)/fs/kfar/trunk/kfar.asm \
File|Managers/kfm:File|Managers/KFM:$(PROGS)/fs/kfm/trunk/kfm.asm \
File|Managers/opendial:File|Managers/OPENDIAL:$(PROGS)/fs/opendial/opendial.asm \
212,6 → 198,23
network/ircc:NETWORK/IRCC:$(PROGS)/network/ircc/ircc.asm \
network/downloader:NETWORK/DOWNLOADER:$(PROGS)/network/downloader/downloader.asm \
# end of list
# Same as above with PE stripping as extra step.
FASM_PROGRAMS_PESTRIP:=\
drivers/vidintel.sys:DRIVERS/VIDINTEL.SYS:$(REPOSITORY)/drivers/vidintel.asm \
drivers/forcedeth.sys:DRIVERS/FORCEDETH.SYS:$(REPOSITORY)/drivers/ethernet/forcedeth.asm \
drivers/i8254x.sys:DRIVERS/I8254X.SYS:$(REPOSITORY)/drivers/ethernet/i8254x.asm \
drivers/i8255x.sys:DRIVERS/I8255X.SYS:$(REPOSITORY)/drivers/ethernet/i8255x.asm \
drivers/mtd80x.sys:DRIVERS/MTD80X.SYS:$(REPOSITORY)/drivers/ethernet/mtd80x.asm \
drivers/pcnet32.sys:DRIVERS/PCNET32.SYS:$(REPOSITORY)/drivers/ethernet/pcnet32.asm \
drivers/r6040.sys:DRIVERS/R6040.SYS:$(REPOSITORY)/drivers/ethernet/R6040.asm \
drivers/rhine.sys:DRIVERS/RHINE.SYS:$(REPOSITORY)/drivers/ethernet/rhine.asm \
drivers/rtl8029.sys:DRIVERS/RTL8029.SYS:$(REPOSITORY)/drivers/ethernet/RTL8029.asm \
drivers/sis900.sys:DRIVERS/SIS900.SYS:$(REPOSITORY)/drivers/ethernet/sis900.asm \
drivers/uhci.sys:DRIVERS/UHCI.SYS:$(REPOSITORY)/drivers/usb/uhci.asm \
drivers/ohci.sys:DRIVERS/OHCI.SYS:$(REPOSITORY)/drivers/usb/ohci.asm \
drivers/ehci.sys:DRIVERS/EHCI.SYS:$(REPOSITORY)/drivers/usb/ehci.asm \
drivers/rdc.sys:DRIVERS/RDC.SYS:$(REPOSITORY)/drivers/video/rdc.asm \
# end of list
# The list of all FASM programs with one main FASM file for CD image.
# Format of an item is exactly the same as in the previous list.
FASM_PROGRAMS_CD:=\
446,9 → 449,15
fsource=$(call respace,$(call sourcepart,$(f)))
fparam=$(call respace,$(call parampart,$(f)))
 
# Add stripped PE files produced by fasm to FASM_NOKPACK_PROGRAMS.
include Makefile.pestrip
FASM_NOKPACK_PROGRAMS:=$(FASM_NOKPACK_PROGRAMS) \
$(foreach f,$(FASM_PROGRAMS_PESTRIP),$(fbinary).full:-:$(fsource))
$(foreach f,$(FASM_PROGRAMS_PESTRIP),$(eval $(call pestrip_meta_rule,$(fbinary),$(fbinary).full)))
 
# Define targets for image file.
# Join all the lists above.
targets_full:=$(COPY_FILES) $(FASM_PROGRAMS) $(NASM_PROGRAMS) $(OTHER_FILES) $(CMM_PROGRAMS)
targets_full:=$(COPY_FILES) $(FASM_PROGRAMS) $(FASM_PROGRAMS_PESTRIP) $(NASM_PROGRAMS) $(OTHER_FILES) $(CMM_PROGRAMS)
# For each item in the united list call fbinary.
targets:=$(foreach f,$(targets_full),$(fbinary))
 
/data/et/Makefile.pestrip
0,0 → 1,11
# This is not a independent Makefile; it is auxiliary file
# included from main Makefile.
 
# The arguments of macro pestrip_meta_rule:
# $(1) = name of stripped file,
# $(2) = name of input file
define pestrip_meta_rule
$(1): $(2) Makefile.pestrip
EXENAME="$$<" fasm ../common/pestrip.asm "$$@"
kpack --nologo "$$@"
endef
/data/it/Makefile
135,24 → 135,10
drivers/usbhid.obj:DRIVERS/USBHID.OBJ:$(KERNEL)/drivers/usbhid/usbhid.asm \
drivers/usbstor.obj:DRIVERS/USBSTOR.OBJ:$(KERNEL)/drivers/usbstor.asm \
drivers/vt823x.obj:DRIVERS/VT823X.OBJ:$(KERNEL)/drivers/vt823x.asm \
drivers/vidintel.obj:DRIVERS/VIDINTEL.OBJ:$(KERNEL)/drivers/vidintel.asm \
drivers/3c59x.obj:DRIVERS/3C59X.OBJ:$(REPOSITORY)/drivers/ethernet/3c59x.asm \
drivers/dec21x4x.obj:DRIVERS/DEC21X4X.OBJ:$(REPOSITORY)/drivers/ethernet/dec21x4x.asm \
drivers/forcedeth.sys:DRIVERS/FORCEDETH.SYS:$(REPOSITORY)/drivers/ethernet/forcedeth.asm \
drivers/i8254x.sys:DRIVERS/I8254X.SYS:$(REPOSITORY)/drivers/ethernet/i8254x.asm \
drivers/i8255x.sys:DRIVERS/I8255X.SYS:$(REPOSITORY)/drivers/ethernet/i8255x.asm \
drivers/mtd80x.sys:DRIVERS/MTD80X.SYS:$(REPOSITORY)/drivers/ethernet/mtd80x.asm \
drivers/pcnet32.sys:DRIVERS/PCNET32.SYS:$(REPOSITORY)/drivers/ethernet/pcnet32.asm \
drivers/r6040.sys:DRIVERS/R6040.SYS:$(REPOSITORY)/drivers/ethernet/R6040.asm \
drivers/rhine.sys:DRIVERS/RHINE.SYS:$(REPOSITORY)/drivers/ethernet/rhine.asm \
drivers/rtl8029.sys:DRIVERS/RTL8029.SYS:$(REPOSITORY)/drivers/ethernet/RTL8029.asm \
drivers/rtl8139.obj:DRIVERS/RTL8139.OBJ:$(REPOSITORY)/drivers/ethernet/RTL8139.asm \
drivers/rtl8169.obj:DRIVERS/RTL8169.OBJ:$(REPOSITORY)/drivers/ethernet/RTL8169.asm \
drivers/sis900.sys:DRIVERS/SIS900.SYS:$(REPOSITORY)/drivers/ethernet/sis900.asm \
drivers/uhci.sys:DRIVERS/UHCI.SYS:$(REPOSITORY)/drivers/usb/uhci.asm \
drivers/ohci.sys:DRIVERS/OHCI.SYS:$(REPOSITORY)/drivers/usb/ohci.asm \
drivers/ehci.sys:DRIVERS/EHCI.SYS:$(REPOSITORY)/drivers/usb/ehci.asm \
drivers/rdc.sys:DRIVERS/RDC.SYS:$(REPOSITORY)/drivers/video/rdc.asm \
File|Managers/kfar:File|Managers/KFAR:$(PROGS)/fs/kfar/trunk/kfar.asm \
File|Managers/kfm:File|Managers/KFM:$(PROGS)/fs/kfm/trunk/kfm.asm \
File|Managers/opendial:File|Managers/OPENDIAL:$(PROGS)/fs/opendial/opendial.asm \
212,6 → 198,23
network/ircc:NETWORK/IRCC:$(PROGS)/network/ircc/ircc.asm \
network/downloader:NETWORK/DOWNLOADER:$(PROGS)/network/downloader/downloader.asm \
# end of list
# Same as above with PE stripping as extra step.
FASM_PROGRAMS_PESTRIP:=\
drivers/vidintel.sys:DRIVERS/VIDINTEL.SYS:$(REPOSITORY)/drivers/vidintel.asm \
drivers/forcedeth.sys:DRIVERS/FORCEDETH.SYS:$(REPOSITORY)/drivers/ethernet/forcedeth.asm \
drivers/i8254x.sys:DRIVERS/I8254X.SYS:$(REPOSITORY)/drivers/ethernet/i8254x.asm \
drivers/i8255x.sys:DRIVERS/I8255X.SYS:$(REPOSITORY)/drivers/ethernet/i8255x.asm \
drivers/mtd80x.sys:DRIVERS/MTD80X.SYS:$(REPOSITORY)/drivers/ethernet/mtd80x.asm \
drivers/pcnet32.sys:DRIVERS/PCNET32.SYS:$(REPOSITORY)/drivers/ethernet/pcnet32.asm \
drivers/r6040.sys:DRIVERS/R6040.SYS:$(REPOSITORY)/drivers/ethernet/R6040.asm \
drivers/rhine.sys:DRIVERS/RHINE.SYS:$(REPOSITORY)/drivers/ethernet/rhine.asm \
drivers/rtl8029.sys:DRIVERS/RTL8029.SYS:$(REPOSITORY)/drivers/ethernet/RTL8029.asm \
drivers/sis900.sys:DRIVERS/SIS900.SYS:$(REPOSITORY)/drivers/ethernet/sis900.asm \
drivers/uhci.sys:DRIVERS/UHCI.SYS:$(REPOSITORY)/drivers/usb/uhci.asm \
drivers/ohci.sys:DRIVERS/OHCI.SYS:$(REPOSITORY)/drivers/usb/ohci.asm \
drivers/ehci.sys:DRIVERS/EHCI.SYS:$(REPOSITORY)/drivers/usb/ehci.asm \
drivers/rdc.sys:DRIVERS/RDC.SYS:$(REPOSITORY)/drivers/video/rdc.asm \
# end of list
# The list of all FASM programs with one main FASM file for CD image.
# Format of an item is exactly the same as in the previous list.
FASM_PROGRAMS_CD:=\
439,9 → 442,16
fsource=$(call respace,$(call sourcepart,$(f)))
fparam=$(call respace,$(call parampart,$(f)))
 
# Add stripped PE files produced by fasm to FASM_NOKPACK_PROGRAMS.
include Makefile.pestrip
FASM_NOKPACK_PROGRAMS:=$(FASM_NOKPACK_PROGRAMS) \
$(foreach f,$(FASM_PROGRAMS_PESTRIP),$(fbinary).full:-:$(fsource))
$(foreach f,$(FASM_PROGRAMS_PESTRIP),$(eval $(call pestrip_meta_rule,$(fbinary),$(fbinary).full)))
 
# Define targets for image file.
# Join all the lists above.
targets_full:=$(COPY_FILES) $(FASM_PROGRAMS) $(NASM_PROGRAMS) $(OTHER_FILES) $(CMM_PROGRAMS)
targets_full:=$(COPY_FILES) $(FASM_PROGRAMS) $(FASM_PROGRAMS_PESTRIP) $(NASM_PROGRAMS) $(OTHER_FILES) $(CMM_PROGRAMS)
# For each item in the united list call fbinary.
targets:=$(foreach f,$(targets_full),$(fbinary))
 
/data/it/Makefile.pestrip
0,0 → 1,11
# This is not a independent Makefile; it is auxiliary file
# included from main Makefile.
 
# The arguments of macro pestrip_meta_rule:
# $(1) = name of stripped file,
# $(2) = name of input file
define pestrip_meta_rule
$(1): $(2) Makefile.pestrip
EXENAME="$$<" fasm ../common/pestrip.asm "$$@"
kpack --nologo "$$@"
endef
/data/rus/Makefile
136,24 → 136,10
drivers/usbhid.obj:DRIVERS/USBHID.OBJ:$(KERNEL)/drivers/usbhid/usbhid.asm \
drivers/usbstor.obj:DRIVERS/USBSTOR.OBJ:$(KERNEL)/drivers/usbstor.asm \
drivers/vt823x.obj:DRIVERS/VT823X.OBJ:$(KERNEL)/drivers/vt823x.asm \
drivers/vidintel.obj:DRIVERS/VIDINTEL.OBJ:$(KERNEL)/drivers/vidintel.asm \
drivers/3c59x.obj:DRIVERS/3C59X.OBJ:$(REPOSITORY)/drivers/ethernet/3c59x.asm \
drivers/dec21x4x.obj:DRIVERS/DEC21X4X.OBJ:$(REPOSITORY)/drivers/ethernet/dec21x4x.asm \
drivers/forcedeth.sys:DRIVERS/FORCEDETH.SYS:$(REPOSITORY)/drivers/ethernet/forcedeth.asm \
drivers/i8254x.sys:DRIVERS/I8254X.SYS:$(REPOSITORY)/drivers/ethernet/i8254x.asm \
drivers/i8255x.sys:DRIVERS/I8255X.SYS:$(REPOSITORY)/drivers/ethernet/i8255x.asm \
drivers/mtd80x.sys:DRIVERS/MTD80X.SYS:$(REPOSITORY)/drivers/ethernet/mtd80x.asm \
drivers/pcnet32.sys:DRIVERS/PCNET32.SYS:$(REPOSITORY)/drivers/ethernet/pcnet32.asm \
drivers/r6040.sys:DRIVERS/R6040.SYS:$(REPOSITORY)/drivers/ethernet/R6040.asm \
drivers/rhine.sys:DRIVERS/RHINE.SYS:$(REPOSITORY)/drivers/ethernet/rhine.asm \
drivers/rtl8029.sys:DRIVERS/RTL8029.SYS:$(REPOSITORY)/drivers/ethernet/RTL8029.asm \
drivers/rtl8139.obj:DRIVERS/RTL8139.OBJ:$(REPOSITORY)/drivers/ethernet/RTL8139.asm \
drivers/rtl8169.obj:DRIVERS/RTL8169.OBJ:$(REPOSITORY)/drivers/ethernet/RTL8169.asm \
drivers/sis900.sys:DRIVERS/SIS900.SYS:$(REPOSITORY)/drivers/ethernet/sis900.asm \
drivers/uhci.sys:DRIVERS/UHCI.SYS:$(REPOSITORY)/drivers/usb/uhci.asm \
drivers/ohci.sys:DRIVERS/OHCI.SYS:$(REPOSITORY)/drivers/usb/ohci.asm \
drivers/ehci.sys:DRIVERS/EHCI.SYS:$(REPOSITORY)/drivers/usb/ehci.asm \
drivers/rdc.sys:DRIVERS/RDC.SYS:$(REPOSITORY)/drivers/video/rdc.asm \
File|Managers/kfar:File|Managers/KFAR:$(PROGS)/fs/kfar/trunk/kfar.asm \
File|Managers/kfm:File|Managers/KFM:$(PROGS)/fs/kfm/trunk/kfm.asm \
File|Managers/opendial:File|Managers/OPENDIAL:$(PROGS)/fs/opendial/opendial.asm \
212,6 → 198,23
network/ircc:NETWORK/IRCC:$(PROGS)/network/ircc/ircc.asm \
network/downloader:NETWORK/DOWNLOADER:$(PROGS)/network/downloader/downloader.asm \
# end of list
# Same as above with PE stripping as extra step.
FASM_PROGRAMS_PESTRIP:=\
drivers/vidintel.sys:DRIVERS/VIDINTEL.SYS:$(REPOSITORY)/drivers/video/vidintel.asm \
drivers/forcedeth.sys:DRIVERS/FORCEDETH.SYS:$(REPOSITORY)/drivers/ethernet/forcedeth.asm \
drivers/i8254x.sys:DRIVERS/I8254X.SYS:$(REPOSITORY)/drivers/ethernet/i8254x.asm \
drivers/i8255x.sys:DRIVERS/I8255X.SYS:$(REPOSITORY)/drivers/ethernet/i8255x.asm \
drivers/mtd80x.sys:DRIVERS/MTD80X.SYS:$(REPOSITORY)/drivers/ethernet/mtd80x.asm \
drivers/pcnet32.sys:DRIVERS/PCNET32.SYS:$(REPOSITORY)/drivers/ethernet/pcnet32.asm \
drivers/r6040.sys:DRIVERS/R6040.SYS:$(REPOSITORY)/drivers/ethernet/R6040.asm \
drivers/rhine.sys:DRIVERS/RHINE.SYS:$(REPOSITORY)/drivers/ethernet/rhine.asm \
drivers/rtl8029.sys:DRIVERS/RTL8029.SYS:$(REPOSITORY)/drivers/ethernet/RTL8029.asm \
drivers/sis900.sys:DRIVERS/SIS900.SYS:$(REPOSITORY)/drivers/ethernet/sis900.asm \
drivers/uhci.sys:DRIVERS/UHCI.SYS:$(REPOSITORY)/drivers/usb/uhci.asm \
drivers/ohci.sys:DRIVERS/OHCI.SYS:$(REPOSITORY)/drivers/usb/ohci.asm \
drivers/ehci.sys:DRIVERS/EHCI.SYS:$(REPOSITORY)/drivers/usb/ehci.asm \
drivers/rdc.sys:DRIVERS/RDC.SYS:$(REPOSITORY)/drivers/video/rdc.asm \
# end of list
# The list of all FASM programs with one main FASM file for CD image.
# Format of an item is exactly the same as in the previous list.
FASM_PROGRAMS_CD:=\
467,9 → 470,15
fsource=$(call respace,$(call sourcepart,$(f)))
fparam=$(call respace,$(call parampart,$(f)))
 
# Add stripped PE files produced by fasm to FASM_NOKPACK_PROGRAMS.
include Makefile.pestrip
FASM_NOKPACK_PROGRAMS:=$(FASM_NOKPACK_PROGRAMS) \
$(foreach f,$(FASM_PROGRAMS_PESTRIP),$(fbinary).full:-:$(fsource))
$(foreach f,$(FASM_PROGRAMS_PESTRIP),$(eval $(call pestrip_meta_rule,$(fbinary),$(fbinary).full)))
 
# Define targets for image file.
# Join all the lists above.
targets_full:=$(COPY_FILES) $(FASM_PROGRAMS) $(NASM_PROGRAMS) $(OTHER_FILES) $(CMM_PROGRAMS)
targets_full:=$(COPY_FILES) $(FASM_PROGRAMS) $(FASM_PROGRAMS_PESTRIP) $(NASM_PROGRAMS) $(OTHER_FILES) $(CMM_PROGRAMS)
# For each item in the united list call fbinary.
targets:=$(foreach f,$(targets_full),$(fbinary))
 
/data/rus/Makefile.pestrip
0,0 → 1,11
# This is not a independent Makefile; it is auxiliary file
# included from main Makefile.
 
# The arguments of macro pestrip_meta_rule:
# $(1) = name of stripped file,
# $(2) = name of input file
define pestrip_meta_rule
$(1): $(2) Makefile.pestrip
EXENAME="$$<" fasm ../common/pestrip.asm "$$@"
kpack --nologo "$$@"
endef
/data/sp/Makefile
135,24 → 135,10
drivers/usbhid.obj:DRIVERS/USBHID.OBJ:$(KERNEL)/drivers/usbhid/usbhid.asm \
drivers/usbstor.obj:DRIVERS/USBSTOR.OBJ:$(KERNEL)/drivers/usbstor.asm \
drivers/vt823x.obj:DRIVERS/VT823X.OBJ:$(KERNEL)/drivers/vt823x.asm \
drivers/vidintel.obj:DRIVERS/VIDINTEL.OBJ:$(KERNEL)/drivers/vidintel.asm \
drivers/3c59x.obj:DRIVERS/3C59X.OBJ:$(REPOSITORY)/drivers/ethernet/3c59x.asm \
drivers/dec21x4x.obj:DRIVERS/DEC21X4X.OBJ:$(REPOSITORY)/drivers/ethernet/dec21x4x.asm \
drivers/forcedeth.sys:DRIVERS/FORCEDETH.SYS:$(REPOSITORY)/drivers/ethernet/forcedeth.asm \
drivers/i8254x.sys:DRIVERS/I8254X.SYS:$(REPOSITORY)/drivers/ethernet/i8254x.asm \
drivers/i8255x.sys:DRIVERS/I8255X.SYS:$(REPOSITORY)/drivers/ethernet/i8255x.asm \
drivers/mtd80x.sys:DRIVERS/MTD80X.SYS:$(REPOSITORY)/drivers/ethernet/mtd80x.asm \
drivers/pcnet32.sys:DRIVERS/PCNET32.SYS:$(REPOSITORY)/drivers/ethernet/pcnet32.asm \
drivers/r6040.sys:DRIVERS/R6040.SYS:$(REPOSITORY)/drivers/ethernet/R6040.asm \
drivers/rhine.sys:DRIVERS/RHINE.SYS:$(REPOSITORY)/drivers/ethernet/rhine.asm \
drivers/rtl8029.sys:DRIVERS/RTL8029.SYS:$(REPOSITORY)/drivers/ethernet/RTL8029.asm \
drivers/rtl8139.obj:DRIVERS/RTL8139.OBJ:$(REPOSITORY)/drivers/ethernet/RTL8139.asm \
drivers/rtl8169.obj:DRIVERS/RTL8169.OBJ:$(REPOSITORY)/drivers/ethernet/RTL8169.asm \
drivers/sis900.sys:DRIVERS/SIS900.SYS:$(REPOSITORY)/drivers/ethernet/sis900.asm \
drivers/uhci.sys:DRIVERS/UHCI.SYS:$(REPOSITORY)/drivers/usb/uhci.asm \
drivers/ohci.sys:DRIVERS/OHCI.SYS:$(REPOSITORY)/drivers/usb/ohci.asm \
drivers/ehci.sys:DRIVERS/EHCI.SYS:$(REPOSITORY)/drivers/usb/ehci.asm \
drivers/rdc.sys:DRIVERS/RDC.SYS:$(REPOSITORY)/drivers/video/rdc.asm \
File|Managers/kfar:File|Managers/KFAR:$(PROGS)/fs/kfar/trunk/kfar.asm \
File|Managers/kfm:File|Managers/KFM:$(PROGS)/fs/kfm/trunk/kfm.asm \
File|Managers/opendial:File|Managers/OPENDIAL:$(PROGS)/fs/opendial/opendial.asm \
212,6 → 198,23
network/ircc:NETWORK/IRCC:$(PROGS)/network/ircc/ircc.asm \
network/downloader:NETWORK/DOWNLOADER:$(PROGS)/network/downloader/downloader.asm \
# end of list
# Same as above with PE stripping as extra step.
FASM_PROGRAMS_PESTRIP:=\
drivers/vidintel.sys:DRIVERS/VIDINTEL.SYS:$(REPOSITORY)/drivers/vidintel.asm \
drivers/forcedeth.sys:DRIVERS/FORCEDETH.SYS:$(REPOSITORY)/drivers/ethernet/forcedeth.asm \
drivers/i8254x.sys:DRIVERS/I8254X.SYS:$(REPOSITORY)/drivers/ethernet/i8254x.asm \
drivers/i8255x.sys:DRIVERS/I8255X.SYS:$(REPOSITORY)/drivers/ethernet/i8255x.asm \
drivers/mtd80x.sys:DRIVERS/MTD80X.SYS:$(REPOSITORY)/drivers/ethernet/mtd80x.asm \
drivers/pcnet32.sys:DRIVERS/PCNET32.SYS:$(REPOSITORY)/drivers/ethernet/pcnet32.asm \
drivers/r6040.sys:DRIVERS/R6040.SYS:$(REPOSITORY)/drivers/ethernet/R6040.asm \
drivers/rhine.sys:DRIVERS/RHINE.SYS:$(REPOSITORY)/drivers/ethernet/rhine.asm \
drivers/rtl8029.sys:DRIVERS/RTL8029.SYS:$(REPOSITORY)/drivers/ethernet/RTL8029.asm \
drivers/sis900.sys:DRIVERS/SIS900.SYS:$(REPOSITORY)/drivers/ethernet/sis900.asm \
drivers/uhci.sys:DRIVERS/UHCI.SYS:$(REPOSITORY)/drivers/usb/uhci.asm \
drivers/ohci.sys:DRIVERS/OHCI.SYS:$(REPOSITORY)/drivers/usb/ohci.asm \
drivers/ehci.sys:DRIVERS/EHCI.SYS:$(REPOSITORY)/drivers/usb/ehci.asm \
drivers/rdc.sys:DRIVERS/RDC.SYS:$(REPOSITORY)/drivers/video/rdc.asm \
# end of list
# The list of all FASM programs with one main FASM file for CD image.
# Format of an item is exactly the same as in the previous list.
FASM_PROGRAMS_CD:=\
445,9 → 448,15
fsource=$(call respace,$(call sourcepart,$(f)))
fparam=$(call respace,$(call parampart,$(f)))
 
# Add stripped PE files produced by fasm to FASM_NOKPACK_PROGRAMS.
include Makefile.pestrip
FASM_NOKPACK_PROGRAMS:=$(FASM_NOKPACK_PROGRAMS) \
$(foreach f,$(FASM_PROGRAMS_PESTRIP),$(fbinary).full:-:$(fsource))
$(foreach f,$(FASM_PROGRAMS_PESTRIP),$(eval $(call pestrip_meta_rule,$(fbinary),$(fbinary).full)))
 
# Define targets for image file.
# Join all the lists above.
targets_full:=$(COPY_FILES) $(FASM_PROGRAMS) $(NASM_PROGRAMS) $(OTHER_FILES) $(CMM_PROGRAMS)
targets_full:=$(COPY_FILES) $(FASM_PROGRAMS) $(FASM_PROGRAMS_PESTRIP) $(NASM_PROGRAMS) $(OTHER_FILES) $(CMM_PROGRAMS)
# For each item in the united list call fbinary.
targets:=$(foreach f,$(targets_full),$(fbinary))
 
/data/sp/Makefile.pestrip
0,0 → 1,11
# This is not a independent Makefile; it is auxiliary file
# included from main Makefile.
 
# The arguments of macro pestrip_meta_rule:
# $(1) = name of stripped file,
# $(2) = name of input file
define pestrip_meta_rule
$(1): $(2) Makefile.pestrip
EXENAME="$$<" fasm ../common/pestrip.asm "$$@"
kpack --nologo "$$@"
endef