mirror of
https://github.com/reactos/reactos.git
synced 2025-05-19 17:14:32 +00:00
doing some maintenance on the posix build system, getting in sync with reactos base.
svn path=/trunk/; revision=3940
This commit is contained in:
parent
0ab5c4ecee
commit
3028effd84
8 changed files with 282 additions and 99 deletions
171
posix/Makefile
171
posix/Makefile
|
@ -1,33 +1,154 @@
|
|||
# $Id: Makefile,v 1.6 2002/10/29 04:44:58 rex Exp $
|
||||
# $Id: Makefile,v 1.7 2003/01/05 18:29:41 robd Exp $
|
||||
#
|
||||
# ReactOS POSIX+ Personality
|
||||
#
|
||||
PATH_TO_TOP=../reactos
|
||||
|
||||
CFLAGS=-Iinclude
|
||||
|
||||
all: lib/crt0w32.o
|
||||
make -C tools
|
||||
make -C lib
|
||||
make -C server
|
||||
make -C lib/psxdll
|
||||
make -C lib/psxx
|
||||
make -C apps/baresh
|
||||
make -C apps/posixw32
|
||||
|
||||
lib/crt0w32.o: lib/crt0w32.c
|
||||
|
||||
clean:
|
||||
make -C lib clean
|
||||
make -C tools clean
|
||||
make -C server clean
|
||||
make -C lib/psxdll clean
|
||||
make -C lib/psxx clean
|
||||
make -C apps/baresh clean
|
||||
make -C apps/posixw32 clean
|
||||
- $(RM) lib/crt0w32.o
|
||||
|
||||
PATH_TO_TOP = ../reactos
|
||||
|
||||
include $(PATH_TO_TOP)/rules.mak
|
||||
|
||||
|
||||
POSIX_OTHER = server #lib
|
||||
|
||||
POSIX_TOOLS = mksystab
|
||||
|
||||
POSIX_LIBS = psxdll psxx
|
||||
|
||||
POSIX_APPS = baresh posixw32
|
||||
|
||||
POSIX_MODULES = $(POSIX_OTHER) $(POSIX_TOOLS) $(POSIX_LIBS) $(POSIX_APPS)
|
||||
|
||||
all: implib $(POSIX_MODULES)
|
||||
|
||||
implib: $(POSIX_MODULES:%=%_implib)
|
||||
|
||||
clean: $(POSIX_MODULES:%=%_clean)
|
||||
|
||||
install: $(POSIX_MODULES:%=%_install)
|
||||
|
||||
#dist: $(TOOLS_PATH)/rcopy$(EXE_POSTFIX) dist_clean dist_dirs \
|
||||
# $(POSIX_MODULES:%=%_dist)
|
||||
|
||||
.PHONY: all implib clean
|
||||
#.PHONY: all implib install dist
|
||||
|
||||
|
||||
#
|
||||
# Other POSIX+ Modules
|
||||
#
|
||||
$(POSIX_OTHER): %:
|
||||
make -f Makefile -C $(POSIX_PATH)/$*
|
||||
|
||||
$(POSIX_OTHER:%=%_implib): %_implib:
|
||||
make -f Makefile -C $(POSIX_PATH)/$* implib
|
||||
|
||||
$(POSIX_OTHER:%=%_clean): %_clean:
|
||||
make -f Makefile -C $(POSIX_PATH)/$* clean
|
||||
|
||||
$(POSIX_OTHER:%=%_dist): %_dist:
|
||||
make -f Makefile -C $(POSIX_PATH)/$* dist
|
||||
|
||||
$(POSIX_OTHER:%=%_install): %_install:
|
||||
make -f Makefile -C $(POSIX_PATH)/$* install
|
||||
|
||||
.PHONY: $(POSIX_OTHER) $(POSIX_OTHER:%=%_implib) $(POSIX_OTHER:%=%_clean) $(POSIX_OTHER:%=%_install) $(POSIX_OTHER:%=%_dist)
|
||||
|
||||
|
||||
#
|
||||
# POSIX+ Tools
|
||||
#
|
||||
$(POSIX_TOOLS): %:
|
||||
make -f Makefile -C $(POSIX_PATH)/tools/$*
|
||||
|
||||
$(POSIX_TOOLS:%=%_implib): %_implib:
|
||||
make -f Makefile -C $(POSIX_PATH)/tools/$* implib
|
||||
|
||||
$(POSIX_TOOLS:%=%_clean): %_clean:
|
||||
make -f Makefile -C $(POSIX_PATH)/tools/$* clean
|
||||
|
||||
$(POSIX_TOOLS:%=%_dist): %_dist:
|
||||
make -f Makefile -C $(POSIX_PATH)/tools/$* dist
|
||||
|
||||
$(POSIX_TOOLS:%=%_install): %_install:
|
||||
make -f Makefile -C $(POSIX_PATH)/tools/$* install
|
||||
|
||||
.PHONY: $(POSIX_LIBS) $(POSIX_LIBS:%=%_implib) $(POSIX_LIBS:%=%_clean) $(POSIX_LIBS:%=%_install) $(POSIX_LIBS:%=%_dist)
|
||||
|
||||
|
||||
#
|
||||
# POSIX+ DLLs
|
||||
#
|
||||
$(POSIX_LIBS): %:
|
||||
make -f Makefile -C $(POSIX_PATH)/lib/$*
|
||||
|
||||
$(POSIX_LIBS:%=%_implib): %_implib:
|
||||
make -f Makefile -C $(POSIX_PATH)/lib/$* implib
|
||||
|
||||
$(POSIX_LIBS:%=%_clean): %_clean:
|
||||
make -f Makefile -C $(POSIX_PATH)/lib/$* clean
|
||||
|
||||
$(POSIX_LIBS:%=%_dist): %_dist:
|
||||
make -f Makefile -C $(POSIX_PATH)/lib/$* dist
|
||||
|
||||
$(POSIX_LIBS:%=%_install): %_install:
|
||||
make -f Makefile -C $(POSIX_PATH)/lib/$* install
|
||||
|
||||
.PHONY: $(POSIX_LIBS) $(POSIX_LIBS:%=%_implib) $(POSIX_LIBS:%=%_clean) $(POSIX_LIBS:%=%_install) $(POSIX_LIBS:%=%_dist)
|
||||
|
||||
|
||||
#
|
||||
# POSIX+ Programs
|
||||
#
|
||||
$(POSIX_APPS): %:
|
||||
make -f Makefile -C $(POSIX_PATH)/apps/$*
|
||||
|
||||
$(POSIX_APPS:%=%_implib): %_implib:
|
||||
make -f Makefile -C $(POSIX_PATH)/apps/$* implib
|
||||
|
||||
$(POSIX_APPS:%=%_clean): %_clean:
|
||||
make -f Makefile -C $(POSIX_PATH)/apps/$* clean
|
||||
|
||||
$(POSIX_APPS:%=%_dist): %_dist:
|
||||
make -f Makefile -C $(POSIX_PATH)/apps/$* dist
|
||||
|
||||
$(POSIX_APPS:%=%_install): %_install:
|
||||
make -f Makefile -C $(POSIX_PATH)/apps/$* install
|
||||
|
||||
.PHONY: $(POSIX_APPS) $(POSIX_APPS:%=%_implib) $(POSIX_APPS:%=%_clean) $(POSIX_APPS:%=%_install) $(POSIX_APPS:%=%_dist)
|
||||
|
||||
|
||||
etags:
|
||||
find . -name "*.[ch]" -print | etags --language=c -
|
||||
|
||||
# EOF
|
||||
|
||||
|
||||
|
||||
#CFLAGS=-Iinclude
|
||||
|
||||
#all: lib/crt0w32.o
|
||||
# make -C tools
|
||||
# make -C lib
|
||||
# make -C server
|
||||
# make -C lib/psxdll
|
||||
# make -C lib/psxx
|
||||
# make -C apps/baresh
|
||||
# make -C apps/posixw32
|
||||
|
||||
#lib/crt0w32.o: lib/crt0w32.c
|
||||
|
||||
#implib:
|
||||
|
||||
#clean:
|
||||
# make -C lib clean
|
||||
# make -C tools clean
|
||||
# make -C server clean
|
||||
# make -C lib/psxdll clean
|
||||
# make -C lib/psxx clean
|
||||
# make -C apps/baresh clean
|
||||
# make -C apps/posixw32 clean
|
||||
# - $(RM) lib/crt0w32.o
|
||||
|
||||
#include $(PATH_TO_TOP)/rules.mak
|
||||
|
||||
# EOF
|
||||
|
|
|
@ -1,47 +1,30 @@
|
|||
# $Id: Makefile,v 1.8 2002/12/26 18:28:25 robd Exp $
|
||||
# $Id: Makefile,v 1.9 2003/01/05 18:27:19 robd Exp $
|
||||
#
|
||||
# Tu run it in Win32 console mode, undefine __SUBSYSTEM_WINDOWS__
|
||||
# To run it in Win32 console mode, undefine __SUBSYSTEM_WINDOWS__
|
||||
# and pass "console" in the ld's --subsystem option.
|
||||
#
|
||||
#
|
||||
PATH_TO_TOP=../../../reactos
|
||||
|
||||
PATH_TO_PSX_TOP=../..
|
||||
PATH_TO_TOP = ../../../reactos
|
||||
|
||||
TARGET_NAME=baresh
|
||||
PATH_TO_PSX_TOP = ../..
|
||||
|
||||
CFLAGS=-D__SUBSYSTEM_WINDOWS__
|
||||
TARGET_TYPE = program
|
||||
|
||||
OBJECTS=sh.o $(TARGET_NAME).coff
|
||||
#TARGET_APPTYPE = console
|
||||
TARGET_APPTYPE = windows
|
||||
|
||||
LIBRARIES=\
|
||||
$(PATH_TO_PSX_TOP)/lib/crt0w32.o \
|
||||
$(PATH_TO_PSX_TOP)/lib/psxdll/psxdll.a
|
||||
TARGET_NAME = baresh
|
||||
|
||||
$(TARGET_NAME): $(OBJECTS) $(LIBRARIES)
|
||||
$(CC) \
|
||||
$(CFLAGS) \
|
||||
$(OBJECTS) \
|
||||
$(LIBRARIES)\
|
||||
-o $@ \
|
||||
-Wl,--subsystem,windows\
|
||||
-nostartfiles \
|
||||
-nostdlib
|
||||
|
||||
$(TARGET_NAME).coff: sh.rc
|
||||
$(RC) \
|
||||
--include-dir $(PATH_TO_TOP)/include \
|
||||
--output-format coff \
|
||||
$< $@
|
||||
|
||||
clean:
|
||||
- $(RM) *.o
|
||||
- $(RM) *.exe
|
||||
- $(RM) *.coff
|
||||
- $(RM) *.sym
|
||||
TARGET_CFLAGS = -D__SUBSYSTEM_WINDOWS__
|
||||
|
||||
TARGET_LIBS = $(PATH_TO_PSX_TOP)/lib/crt0w32.o \
|
||||
$(PATH_TO_TOP)/dk/psx/lib/psxdll.a
|
||||
|
||||
TARGET_OBJECTS = sh.o
|
||||
|
||||
include $(PATH_TO_TOP)/rules.mak
|
||||
|
||||
include $(TOOLS_PATH)/helper.mk
|
||||
|
||||
# EOF
|
||||
|
|
38
posix/apps/baresh/baresh.rc
Normal file
38
posix/apps/baresh/baresh.rc
Normal file
|
@ -0,0 +1,38 @@
|
|||
#include <defines.h>
|
||||
#include <reactos/resource.h>
|
||||
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION RES_UINT_FV_MAJOR,RES_UINT_FV_MINOR,RES_UINT_FV_REVISION,RES_UINT_FV_BUILD
|
||||
PRODUCTVERSION RES_UINT_PV_MAJOR,RES_UINT_PV_MINOR,RES_UINT_PV_REVISION,RES_UINT_PV_BUILD
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
#else
|
||||
FILEFLAGS 0x0L
|
||||
#endif
|
||||
FILEOS 0x40004L
|
||||
FILETYPE 0x2L
|
||||
FILESUBTYPE 0x0L
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "040904b0"
|
||||
BEGIN
|
||||
VALUE "CompanyName", RES_STR_COMPANY_NAME
|
||||
VALUE "FileDescription", "Bare sh for POSIX+\0"
|
||||
VALUE "FileVersion", RES_STR_FILE_VERSION
|
||||
VALUE "InternalName", "sh\0"
|
||||
VALUE "LegalCopyright", RES_STR_LEGAL_COPYRIGHT
|
||||
VALUE "OriginalFilename", "sh\0"
|
||||
VALUE "ProductName", RES_STR_PRODUCT_NAME
|
||||
VALUE "ProductVersion", RES_STR_PRODUCT_VERSION
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x409, 1200
|
||||
END
|
||||
END
|
||||
|
|
@ -1,20 +1,26 @@
|
|||
# $Id: Makefile,v 1.3 2002/10/29 04:44:59 rex Exp $
|
||||
# $Id: Makefile,v 1.4 2003/01/05 18:27:19 robd Exp $
|
||||
#
|
||||
# Win32 Terminal Emulator for the POSIX+ subsystem.
|
||||
#
|
||||
PATH_TO_TOP=../../../reactos
|
||||
PATH_TO_TOP_PSX=../..
|
||||
|
||||
TARGET_NAME=posixw32
|
||||
TARGET_TYPE=program
|
||||
TARGET_APPTYPE=console
|
||||
TARGET_CFLAGS =-I$(PATH_TO_TOP_PSX)/include
|
||||
TARGET_SDKLIBS=ntdll.a kernel32.a
|
||||
TARGET_OBJECTS=\
|
||||
PATH_TO_TOP = ../../../reactos
|
||||
|
||||
PATH_TO_TOP_PSX = ../..
|
||||
|
||||
TARGET_NAME = posixw32
|
||||
|
||||
TARGET_TYPE = program
|
||||
|
||||
TARGET_APPTYPE = console
|
||||
|
||||
TARGET_CFLAGS = -I$(PATH_TO_TOP_PSX)/include
|
||||
|
||||
TARGET_SDKLIBS = ntdll.a kernel32.a
|
||||
|
||||
TARGET_OBJECTS = \
|
||||
$(TARGET_NAME).o \
|
||||
console.o \
|
||||
vt100.o \
|
||||
$(TARGET_NAME).coff
|
||||
vt100.o
|
||||
|
||||
include $(PATH_TO_TOP)/rules.mak
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: stdlib.h,v 1.4 2002/10/29 04:45:15 rex Exp $
|
||||
/* $Id: stdlib.h,v 1.5 2003/01/05 18:27:20 robd Exp $
|
||||
*/
|
||||
/*
|
||||
* psx/stdlib.h
|
||||
|
@ -39,7 +39,11 @@
|
|||
|
||||
/* MACROS */
|
||||
/* FIXME? Windows NT's ntdll doesn't export RtlGetProcessHeap() */
|
||||
#define RtlGetProcessHeap() ((HANDLE)NtCurrentPeb()->ProcessHeap)
|
||||
//#define RtlGetProcessHeap() ((HANDLE)NtCurrentPeb()->ProcessHeap)
|
||||
#ifndef _RTLGETPROCESSHEAP_DEFINED_
|
||||
#define _RTLGETPROCESSHEAP_DEFINED_
|
||||
#define RtlGetProcessHeap() (NtCurrentPeb()->ProcessHeap)
|
||||
#endif
|
||||
|
||||
#define __malloc(SIZE) (RtlAllocateHeap(RtlGetProcessHeap(), 0, (SIZE)))
|
||||
#define __realloc(PTR,SIZE) (RtlReAllocateHeap(RtlGetProcessHeap(), 0, (PTR), (SIZE)))
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: stddef.h,v 1.4 2002/10/29 04:45:19 rex Exp $
|
||||
/* $Id: stddef.h,v 1.5 2003/01/05 18:27:19 robd Exp $
|
||||
*/
|
||||
/*
|
||||
* stddef.h
|
||||
|
@ -32,7 +32,20 @@
|
|||
|
||||
/* TYPES */
|
||||
typedef signed long int ptrdiff_t;
|
||||
typedef unsigned short int wchar_t;
|
||||
|
||||
#ifndef _WCHAR_T_
|
||||
#define _WCHAR_T_
|
||||
#define _WCHAR_T
|
||||
#define _WCHAR_T_DEFINED
|
||||
#ifndef __WCHAR_TYPE__
|
||||
#define __WCHAR_TYPE__ short unsigned int
|
||||
#endif
|
||||
#ifndef __cplusplus
|
||||
typedef __WCHAR_TYPE__ wchar_t;
|
||||
#endif /* C++ */
|
||||
#endif /* _WCHAR_T_ */
|
||||
|
||||
//typedef unsigned short int wchar_t;
|
||||
|
||||
/* CONSTANTS */
|
||||
#ifndef NULL
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $Id: Makefile,v 1.13 2002/10/29 04:45:26 rex Exp $
|
||||
# $Id: Makefile,v 1.14 2003/01/05 18:27:19 robd Exp $
|
||||
|
||||
PATH_TO_TOP = ../../../reactos
|
||||
|
||||
|
@ -10,8 +10,6 @@ TARGET_NAME = psxdll
|
|||
|
||||
TARGET_LIBPATH = $(PATH_TO_TOP)/dk/psx/lib
|
||||
|
||||
TARGET_LFLAGS = -nostartfiles
|
||||
|
||||
TARGET_SDKLIBS = ntdll.a
|
||||
|
||||
TARGET_BASE = 0x68EB0000
|
||||
|
@ -28,12 +26,7 @@ TARGET_CFLAGS =\
|
|||
-D__PSXDLL__ \
|
||||
-D__PSX_DEBUG_WANT_ALL__
|
||||
|
||||
TARGET_OBJECTS = $(TARGET_NAME).o
|
||||
|
||||
TARGET_CLEAN = $(OBJECTS) csrapi.a
|
||||
|
||||
include $(PATH_TO_TOP)/rules.mak
|
||||
include $(TOOLS_PATH)/helper.mk
|
||||
TARGET_LFLAGS = -nostartfiles
|
||||
|
||||
OBJECTS_MISC = \
|
||||
misc/main.o \
|
||||
|
@ -130,26 +123,50 @@ OBJECTS = \
|
|||
$(OBJECTS_SYS_UTSNAME) \
|
||||
$(OBJECTS_UNISTD)
|
||||
|
||||
DEP_OBJECTS = $(OBJECTS)
|
||||
#TARGET_OBJECTS = $(TARGET_NAME).o
|
||||
|
||||
include $(TOOLS_PATH)/depend.mk
|
||||
TARGET_OBJECTS = \
|
||||
$(OBJECTS_MISC) \
|
||||
$(OBJECTS_DIRENT) \
|
||||
$(OBJECTS_DLFCN) \
|
||||
$(OBJECTS_ERRNO) \
|
||||
$(OBJECTS_FCNTL) \
|
||||
$(OBJECTS_LIBGEN) \
|
||||
$(OBJECTS_SCHED) \
|
||||
$(OBJECTS_SIGNAL) \
|
||||
$(OBJECTS_STDLIB) \
|
||||
$(OBJECTS_STRING) \
|
||||
$(OBJECTS_PTHREAD) \
|
||||
$(OBJECTS_SYS_STAT) \
|
||||
$(OBJECTS_SYS_UTSNAME) \
|
||||
$(OBJECTS_UNISTD)
|
||||
|
||||
DTFLAGS = -k -l $@
|
||||
#TARGET_CLEAN = $(OBJECTS) csrapi.a
|
||||
|
||||
$(TARGET_NAME).a: $(TARGET_NAME).def
|
||||
$(DLLTOOL) \
|
||||
$(DTFLAGS) \
|
||||
-D $(TARGET_NAME).dll \
|
||||
-d $(TARGET_NAME).def
|
||||
include $(PATH_TO_TOP)/rules.mak
|
||||
|
||||
csrapi.a: csrapi.def
|
||||
$(DLLTOOL) \
|
||||
$(DTFLAGS) \
|
||||
-D ntdll.dll \
|
||||
-d csrapi.def
|
||||
include $(TOOLS_PATH)/helper.mk
|
||||
|
||||
$(TARGET_NAME).o: csrapi.a $(OBJECTS)
|
||||
$(LD) -r $(OBJECTS) -o $(TARGET_NAME).o
|
||||
|
||||
#DEP_OBJECTS = $(OBJECTS)
|
||||
|
||||
#include $(TOOLS_PATH)/depend.mk
|
||||
|
||||
#DTFLAGS = -k -l $@
|
||||
|
||||
#$(TARGET_NAME).a: $(TARGET_NAME).def
|
||||
# $(DLLTOOL) \
|
||||
# $(DTFLAGS) \
|
||||
# -D $(TARGET_NAME).dll \
|
||||
# -d $(TARGET_NAME).def
|
||||
|
||||
#csrapi.a: csrapi.def
|
||||
# $(DLLTOOL) \
|
||||
# $(DTFLAGS) \
|
||||
# -D ntdll.dll \
|
||||
# -d csrapi.def
|
||||
|
||||
#$(TARGET_NAME).o: csrapi.a $(OBJECTS)
|
||||
# $(LD) -r $(OBJECTS) -o $(TARGET_NAME).o
|
||||
|
||||
# EOF
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
# $Id: Makefile,v 1.4 2002/10/29 04:45:50 rex Exp $
|
||||
# $Id: Makefile,v 1.5 2003/01/05 18:27:19 robd Exp $
|
||||
#
|
||||
# ReactOS POSIX+ Environment Subsystem
|
||||
#
|
||||
PATH_TO_TOP=../../reactos
|
||||
|
||||
PATH_TO_TOP = ../../reactos
|
||||
|
||||
TARGET_TYPE = program
|
||||
|
||||
|
@ -14,7 +15,7 @@ TARGET_APPTYPE = console
|
|||
|
||||
TARGET_SDKLIBS = ntdll.a kernel32.a
|
||||
|
||||
TARGET_CFLAGS=-Iinclude -I../include -D__PSXSS_ON_W32__
|
||||
TARGET_CFLAGS = -Iinclude -I../include -D__PSXSS_ON_W32__
|
||||
|
||||
PSXSS_MISC_OBJECTS = \
|
||||
misc/main.o \
|
||||
|
@ -38,7 +39,7 @@ PSXSS_CALL_OBJECTS = \
|
|||
call/stubs.o \
|
||||
call/syscall.o
|
||||
|
||||
TARGET_OBJECTS=\
|
||||
TARGET_OBJECTS = \
|
||||
$(PSXSS_MISC_OBJECTS) \
|
||||
$(PSXSS_OB_OBJECTS) \
|
||||
$(PSXSS_PORT_OBJECTS) \
|
||||
|
|
Loading…
Reference in a new issue