Add experimental jamfiles (still buggy).

svn path=/trunk/; revision=4745
This commit is contained in:
Eric Kohl 2003-05-23 22:43:03 +00:00
parent 04572bc608
commit 6528cf1fdc
6 changed files with 252 additions and 0 deletions

5
reactos/Jamfile Normal file
View file

@ -0,0 +1,5 @@
# Main jamfile for ReactOS
SubDir ROS_TOP ;
SubInclude ROS_TOP Lib ;

54
reactos/Jamrules Normal file
View file

@ -0,0 +1,54 @@
# customization for ReactOS goes here
# The SharedLibrary and SharedLibraryFromObjects rules were
# borrowed from here:
# http://www.differentpla.net/~roger/devel/jam/tutorial/shared_lib/index.html
SUFSHR = .dll ;
RM = rm ; # rm comes with MinGW, and the default del doesn't work in some cases
rule SharedLibrary
{
SharedLibraryFromObjects $(<) : $(>:S=$(SUFOBJ)) ;
Objects $(>) ;
}
rule SharedLibraryFromObjects
{
local _s _t ;
# Add grist to file names
# Add suffix to dll
_s = [ FGristFiles $(>) ] ;
_t = [ FAppendSuffix $(<) : $(SUFSHR) ] ;
if $(_t) != $(<)
{
DEPENDS $(<) : $(_t) ;
NOTFILE $(<) ;
}
# make compiled sources a dependency of target
DEPENDS exe : $(_t) ;
DEPENDS $(_t) : $(_s) ;
MakeLocate $(_t) : $(LOCATE_TARGET) ;
Clean clean : $(_t) ;
Link $(_t) : $(_s) ;
}
# nasm needs to know the output file first, or it doesn't
# recognize -I :(
actions As
{
$(AS) -o $(<) $(ASFLAGS) -I$(HDRS) $(>)
}
AS = nasm ;
# why isn't DEFINES working? :(
#DEFINES += _M_IX86 ;
CCFLAGS += -D_M_IX86 ;

5
reactos/lib/Jamfile Normal file
View file

@ -0,0 +1,5 @@
SubDir ROS_TOP Lib ;
SubInclude ROS_TOP Lib Ntdll ;
SubInclude ROS_TOP Lib Advapi32 ;
SubInclude ROS_TOP Lib Kernel32 ;

View file

@ -0,0 +1,34 @@
SubDir ROS_TOP Lib Advapi32 ;
# This stuff should actually be moved to Jamrules
# in order to more easily support other compilers
CCFLAGS += -Wall -fno-builtin ;
# NOTE - I'm no Jam expert, yet. This stuff should be
# abstracted into the Jamrules file.
LINKFLAGS += -nostartfiles -nostdlib ;
LINKFLAGS += -Wl,--image-base,0x77DB0000 ;
MISC_SRCS = dllmain shutdown sysfunc ;
REG_SRCS = reg ;
SEC_SRCS = ac lsa misc sec sid ;
SERVICE_SRCS = scm sctrl undoc ;
TOKEN_SRCS = privilege token ;
ADVAPI32_SRCS =
misc/$(MISC_SRCS).c
reg/$(REG_SRCS).c
sec/$(SEC_SRCS).c
service/$(SERVICE_SRCS).c
token/$(TOKEN_SRCS).c
;
SharedLibrary advapi32 : $(ADVAPI32_SRCS) ;
LINKLIBS =
$(ROS_TOP)/dk/w32/lib/ntdll.a
$(ROS_TOP)/dk/w32/lib/kernel32.a
;

View file

@ -0,0 +1,66 @@
SubDir ROS_TOP lib kernel32 ;
# This stuff should actually be moved to Jamrules
# in order to more easily support other compilers
CCFLAGS += -Wall -fno-builtin ;
# NOTE - I'm no Jam expert, yet. This stuff should be
# abstracted into the Jamrules file.
LINKFLAGS = -nostartfiles -nostdlib -shared ;
LINKFLAGS += -Wl,--image-base,0x77F00000 -lgcc ;
SYNCH_SRCS =
critical event intrlck mutex
sem timer wait
;
MISC_SRCS =
error atom handle env
dllmain comm errormsg
console time toolhelp
stubs ldr res
sysinfo profile
mbchars muldiv getname
perfcnt
;
FILE_SRCS =
file curdir lfile dir
iocompl volume deviceio dosdev
create find copy pipe
move lock rw delete
npipe tape mailslot backup
cnotify
;
MEM_SRCS =
global heap isbad local
procmem section virtual
;
THREAD_SRCS = fiber thread tls ;
PROCESS_SRCS = proc cmdline create session ;
STRING_SRCS = lstring ;
EXCEPT_SRCS = except ;
KERNEL32_SRCS =
misc/$(MISC_SRCS).c
file/$(FILE_SRCS).c
thread/$(THREAD_SRCS).c
process/$(PROCESS_SRCS).c
string/$(STRING_SRCS).c
mem/$(MEM_SRCS).c
synch/$(SYNCH_SRCS).c
except/$(EXCEPT_SRCS).c
;
SharedLibrary kernel32 : $(KERNEL32_SRCS) ;
LINKLIBS =
$(ROS_TOP)/dk/w32/lib/ntdll.a
$(ROS_TOP)/dk/w32/lib/rosrtl.a
;

88
reactos/lib/ntdll/Jamfile Normal file
View file

@ -0,0 +1,88 @@
SubDir ROS_TOP Lib Ntdll ;
HDRS += $(ROS_TOP)/Include ;
#Echo HDRS is $(HDRS) ;
#Echo AS is $(AS) ;
# for some reason DEFINES isn't coming in :(
#DEFINES += __NTDLL__ ;
CCFLAGS += -D__NTDLL__ ; # less portable :(
# This stuff should actually be moved to Jamrules
# in order to more easily support other compilers
#CCFLAGS += -Wall -Werror -fno-builtin ;
CCFLAGS += -Wall -fno-builtin ;
# NOTE - I'm no Jam expert, yet. This stuff should be
# abstracted into the Jamrules file.
LINKFLAGS += -Wl,--image-base,0x77f60000 ;
LINKFLAGS += -Wl,--file-alignment,0x1000
-Wl,--section-alignment,0x1000
-nostartfiles
;
# This needs to be abstracted to Jamrules, too
LINKFLAGS += -Wl,--entry,_LdrInitializeThunk@16 ;
# we need to override action As here, because we're
# compiling except.s with gcc instead of as...
actions As
{
$(CC) -c -x assembler-with-cpp $(ASFLAGS) -c $(>) -o $(<)
}
CSR_SRCS = lpc capture probe thread ;
DBG_SRCS = brkpoint debug print ; #winedbg
RTL_I386_SRCS = exception.c except.s ;
RTL_SRCS = critical error heap largeint
math mem nls process sd
thread unicode env path ppb
bitmap time acl sid image
access apc callback luid misc
registry exception intrlck resource
handle atom message timezone
propvar security dos8dot3 compress
;
STDIO_SRCS = sprintf swprintf ;
STDLIB_SRCS = abs atoi atoi64 atol
itoa itow labs splitp
strtol strtoul wcstol
wcstoul wtoi wtoi64 wtol
mbstowcs wcstombs qsort
;
STRING_SRCS = ctype memccpy memchr
memcmp memcpy memicmp
memmove memset strcat
strchr strcmp strcspn
strcpy stricmp strlen
strlwr strncat strncmp
strncpy strnicmp strnlen
strpbrk strrchr strspn
strstr strupr wstring
;
NTDLL_SRCS =
napi.c
ldr/startup.c
rtl/i386/$(RTL_I386_SRCS)
dbg/$(DBG_SRCS).c
rtl/$(RTL_SRCS).c
stdio/$(STDIO_SRCS).c
stdlib/$(STDLIB_SRCS).c
string/$(STRING_SRCS).c
stubs/stubs.c
ldr/res.c
ldr/utils.c
csr/$(CSR_SRCS).c
;
SharedLibrary ntdll : $(NTDLL_SRCS) ;