- Delete ntoskrnl/ps/i386/*.o on "make clean".

- Standardize Explorer makefile.
- Remove obsolete WINE_MODE and WINE_RC handling from helper.mk.

svn path=/trunk/; revision=10358
This commit is contained in:
Filip Navara 2004-08-02 15:04:24 +00:00
parent 16ac657bde
commit 7193e1d360
7 changed files with 81 additions and 212 deletions

View file

@ -29,9 +29,9 @@
* DISCLAIMED. This includes but is not limited to warranties of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* $Revision: 1.13 $
* $Revision: 1.14 $
* $Author: navaraf $
* $Date: 2004/08/02 02:52:31 $
* $Date: 2004/08/02 15:04:24 $
*
*/
@ -151,6 +151,7 @@ typedef wchar_t TCHAR;
#define _tcsftime wcsftime
#define _tsplitpath _wsplitpath
#define _tmakepath _wmakepath
#define _tfopen _wfopen
#else /* Not _UNICODE */
@ -258,6 +259,7 @@ typedef char TCHAR;
#define _tcsftime strftime
#define _tsplitpath _splitpath
#define _tmakepath _makepath
#define _tfopen fopen
#endif /* Not _UNICODE */

View file

@ -1,4 +1,4 @@
# $Id: Makefile,v 1.134 2004/07/23 20:03:25 chorns Exp $
# $Id: Makefile,v 1.135 2004/08/02 15:04:24 navaraf Exp $
#
# ReactOS Operating System
#
@ -695,11 +695,12 @@ test:
clean:
- $(RM) $(OBJECTS_PATH)/*.o cc/*.o cm/*.o dbg/*.o dbg/i386/*.o ex/*.o \
ex/i386/*.o inbv/*.o io/*.o ke/*.o ldr/*.o mm/*.o nt/*.o ob/*.o ps/*.o \
rtl/*.o rtl/i386/*.o se/*.o ke/i386/*.o mm/i386/*.o fs/*.o po/*.o \
lpc/*.o kd/*.o $(TARGETNAME).o junk.tmp base.tmp temp.exp \
$(TARGETNAME).exe $(TARGETNAME).nostrip.exe $(TARGETNAME).sym ntoskrnl.map \
$(TARGETNAME).coff bugcodes.rc msg?????.bin $(DEP_FILES) \
ex/i386/*.o inbv/*.o io/*.o ke/*.o ldr/*.o mm/*.o nt/*.o ob/*.o \
ps/*.o ps/i386/*.o rtl/*.o rtl/i386/*.o se/*.o ke/i386/*.o \
mm/i386/*.o fs/*.o po/*.o lpc/*.o kd/*.o $(TARGETNAME).o \
junk.tmp base.tmp temp.exp $(TARGETNAME).exe \
$(TARGETNAME).nostrip.exe $(TARGETNAME).sym ntoskrnl.map \
$(TARGETNAME).coff bugcodes.rc msg?????.bin $(DEP_FILES) \
$(TAG_OBJECTS) $(PATH_TO_TOP)/include/reactos/bugcodes.h

View file

@ -4,188 +4,56 @@
# Makefile
#
# Windows is default host environment
ifeq ($(HOST),)
HOST = mingw32-windows
endif
# Set up default prefix
ifeq ($(PREFIX),)
PREFIX = mingw32-
endif
ifeq ($(HOST),mingw32-linux)
CC = $(PREFIX)gcc
CXX = $(PREFIX)g++
LINK = $(PREFIX)g++
RC = $(PREFIX)windres
CD_PREFIX := ./
EXE_POSTFIX :=
EXE_PREFIX := ./
endif
ifeq ($(HOST),mingw32-windows)
CC = gcc
CXX = g++
LINK = g++
RC = windres
CD_PREFIX :=
PREFIX =
EXE_PREFIX :=
EXE_POSTFIX := .exe
endif
PATH_TO_TOP = ../../..
W32API_PATH = $(PATH_TO_TOP)/w32api
TOOLS_PATH = $(PATH_TO_TOP)/tools
ifndef UNICODE
UNICODE = 1
endif
CFLAGS = -DWIN32 -D_ROS_ -D_WIN32_IE=0x0600 -D_WIN32_WINNT=0x0501 -fexceptions -Wall -I. -I$(W32API_PATH)/include
RCFLAGS = -DWIN32 -D_ROS_ -D__WINDRES__ --include-dir $(W32API_PATH)/include
LFLAGS = -Wl,--subsystem,windows
ifdef DEBUG
CFLAGS += -D_DEBUG -g
RCFLAGS += -D_DEBUG
LFLAGS += -g
else
CFLAGS += -DNDEBUG -Os
RCFLAGS += -DNDEBUG
LFLAGS += -s
endif
ifeq ($(UNICODE),1)
CFLAGS += -DUNICODE
# LFLAGS+= -Wl,--entry,_wWinMain@16
endif
CXXFLAGS = $(CFLAGS)
EXEC_SUFFIX = .exe
RES_SUFFIX = .coff
VPATH = shell utility taskbar desktop dialogs
PROGRAM = explorer
TARGET = $(PROGRAM)$(EXEC_SUFFIX)
OBJECTS = \
startup.o \
shellclasses.o \
utility.o \
window.o \
dragdropimpl.o \
shellbrowserimpl.o \
PATH_TO_TOP := ../../..
TARGET_TYPE := program
TARGET_APPTYPE := windows
TARGET_NAME := explorer
TARGET_INSTALLDIR := .
TARGET_CFLAGS := \
-D__USE_W32API -DWIN32 -D_ROS_ -D_WIN32_IE=0x0600 \
-D_WIN32_WINNT=0x0501 -DUNICODE -fexceptions -Wall
TARGET_CPPFLAGS := $(TARGET_CFLAGS)
TARGET_RCFLAGS := -D__USE_W32API -DWIN32 -D_ROS_ -D__WINDRES__
TARGET_SDKLIBS := \
gdi32.a comctl32.a ole32.a oleaut32.a shell32.a libexpat.a \
notifyhook.a ws2_32.a
TARGET_GCCLIBS := stdc++ uuid
TARGET_OBJECTS := \
explorer.o \
entries.o \
winfs.o \
unixfs.o \
shellfs.o \
ntobjfs.o \
regfs.o \
fatfs.o \
webchild.o \
mainframe.o \
filechild.o \
pane.o \
shellbrowser.o \
desktop.o \
desktopbar.o \
taskbar.o \
startmenu.o \
traynotify.o \
quicklaunch.o \
favorites.o \
searchprogram.o \
settings.o \
i386-stub-win32.o \
xmlstorage.o
desktop/desktop.o \
dialogs/searchprogram.o \
dialogs/settings.o \
shell/entries.o \
shell/fatfs.o \
shell/filechild.o \
shell/shellfs.o \
shell/mainframe.o \
shell/ntobjfs.o \
shell/pane.o \
shell/regfs.o \
shell/shellbrowser.o \
shell/startup.o \
shell/unixfs.o \
shell/webchild.o \
shell/winfs.o \
taskbar/desktopbar.o \
taskbar/taskbar.o \
taskbar/startmenu.o \
taskbar/traynotify.o \
taskbar/quicklaunch.o \
taskbar/favorites.o \
utility/shellclasses.o \
utility/utility.o \
utility/window.o \
utility/dragdropimpl.o \
utility/shellbrowserimpl.o \
utility/xmlstorage.o
SUBDIRS := notifyhook
DEP_OBJECTS := $(TARGET_OBJECTS)
LIBS = gdi32 comctl32 ole32 uuid expat
DELAYIMPORTS = oleaut32 wsock32
include $(PATH_TO_TOP)/rules.mak
.PHONY: all depends implib clean install dist bootcd depends
all: buildno.h $(TARGET)
docu: doxy-footer.html
doxygen Doxyfile
full-docu: docu
-cmd /c start /b /low /wait hhc doxy-doc\html\index.hhp
cmd /c move /y doxy-doc\html\index.chm ros-explorer.chm
doxygen Doxyfile-all
-cmd /c start /b /low /wait hhc doxy-doc\html\index.hhp
cmd /c move /y doxy-doc\html\index.chm ros-explorer-full.chm
doxy-footer.html: ever
updatefooter
ever:
buildno.h: ../../../include/reactos/buildno.h
$(CD_PREFIX)updatebuildno
$(TARGET): $(OBJECTS) $(PROGRAM)$(RES_SUFFIX) notifyhook.dll
$(LINK) $(LFLAGS) -o $@ $^ $(addprefix -l,$(LIBS)) $(addprefix -l,$(DELAYIMPORTS)) -L$(PATH_TO_TOP)/dk/w32/lib
explorer$(RES_SUFFIX): $(PROGRAM)_intres.rc res/*.bmp res/*.ico
$(RC) $(RCFLAGS) -o $@ $(PROGRAM)_intres.rc
notifyhook.dll: notifyhook/notifyhook.c notifyhook/notifyhook.h
$(CC) -D_WIN32_IE=0x0600 -Wall -D_NOTIFYHOOK_IMPL -Os -s notifyhook/notifyhook.c -shared -o $@
clean:
$(TOOLS_PATH)/rdel $(TARGET) $(OBJECTS) $(PROGRAM)$(RES_SUFFIX) $(DEP_FILES) buildno.h notifyhook.dll
LIVECD_DIR=$(PATH_TO_TOP)/../livecd/disk
ifeq ($(LIVECD_INSTALL),yes)
INSTALL_DIR=$(LIVECD_DIR)/reactos
else
# Use environment var ROS_INSTALL to override default install dir
ifeq ($(ROS_INSTALL),)
ifeq ($(HOST),mingw32-windows)
INSTALL_DIR = C:/reactos
else
INSTALL_DIR = $(PATH_TO_TOP)/reactos
endif
else
INSTALL_DIR = $(ROS_INSTALL)
endif
endif
implib:
install:
-$(TOOLS_PATH)/rcopy $(TARGET) $(INSTALL_DIR)/$(TARGET)
-$(TOOLS_PATH)/rcopy notifyhook.dll $(INSTALL_DIR)/system32/notifyhook.dll
bootcd:
# dependency scanning
DEP_FILTERED := $(filter-out $(DEP_EXCLUDE_FILTER), $(OBJECTS:.o=.d))
DEP_FILES := $(join $(dir $(DEP_FILTERED)), $(addprefix ., $(notdir $(DEP_FILTERED))))
ifneq ($(MAKECMDGOALS),clean)
-include $(DEP_FILES)
endif
ifeq ($(HOST),mingw32-windows)
DEPENDS_EXE := ..\..\..\tools\depends
else
DEPENDS_EXE := $(TOOLS_PATH)/depends
endif
.%.d: %.c $(PATH_TO_TOP)/tools/depends$(EXE_POSTFIX)
$(CC) $(CFLAGS) -M $< | $(DEPENDS_EXE) $(@D) $@
.%.d: %.cpp $(PATH_TO_TOP)/tools/depends$(EXE_POSTFIX)
$(CC) $(CFLAGS) -M $< | $(DEPENDS_EXE) $(@D) $@
include $(TOOLS_PATH)/helper.mk
include $(TOOLS_PATH)/depend.mk

View file

@ -306,7 +306,11 @@ void BackgroundWindow::DrawDesktopBkgnd(HDC hdc)
rect.right = rect.left + 250;
rect.bottom = rect.top + 40;
#include "../buildno.h"
#ifdef _ROS_
#include <reactos/buildno.h>
#else
#include "../buildno.h"
#endif
static const LPCTSTR BkgndText = TEXT("ReactOS ")TEXT(KERNEL_VERSION_STR)TEXT(" Explorer\nby Martin Fuchs");
BkMode bkMode(hdc, TRANSPARENT);

View file

@ -0,0 +1,10 @@
PATH_TO_TOP := ../../../..
TARGET_TYPE := dynlink
TARGET_NAME := notifyhook
TARGET_CFLAGS := -D__USE_W32API -D_WIN32_IE=0x0600 -Wall -D_NOTIFYHOOK_IMPL
TARGET_NORC := yes
TARGET_DEFONLY := yes
TARGET_OBJECTS := notifyhook.o
include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk

View file

@ -0,0 +1,5 @@
EXPORTS
DeinstallNotifyHook
GetWindowModulePath
GetWindowModulePathCopyData
InstallNotifyHook

View file

@ -1,4 +1,4 @@
# $Id: helper.mk,v 1.72 2004/08/01 23:27:56 navaraf Exp $
# $Id: helper.mk,v 1.73 2004/08/02 15:04:24 navaraf Exp $
#
# Helper makefile for ReactOS modules
# Variables this makefile accepts:
@ -51,8 +51,6 @@
# $TARGET_BOOTSTRAP_NAME = Name on the installation medium (optional)
# $TARGET_REGTESTS = This module has regression tests (no,yes) (optional)
# $TARGET_BUILDENV_TEST = Build this test to be run in the build environment (no,yes) (optional)
# $WINE_MODE = Compile using WINE headers (no,yes) (optional)
# $WINE_RC = Name of .rc file for WINE modules (optional)
# $SUBDIRS = Subdirs in which to run make (optional)
include $(PATH_TO_TOP)/config
@ -122,14 +120,8 @@ ifeq ($(TARGET_TYPE),program)
MK_DEFENTRY := _DEFINE_TARGET_APPTYPE
MK_DDKLIBS :=
MK_SDKLIBS :=
ifneq ($(WINE_MODE),yes)
MK_CFLAGS := -I.
MK_CPPFLAGS := -I.
else
MK_CFLAGS := -I$(PATH_TO_TOP)/include/wine
MK_CPPFLAGS := -I$(PATH_TO_TOP)/include/wine
MK_RCFLAGS := --include-dir $(PATH_TO_TOP)/include/wine --include-dir $(WINE_INCLUDE)
endif
MK_IMPLIB := no
MK_IMPLIBONLY := no
MK_IMPLIBDEFPATH :=
@ -137,11 +129,7 @@ endif
MK_INSTALLDIR := bin
MK_BOOTCDDIR := system32
MK_DISTDIR := apps
ifeq ($(WINE_RC),)
MK_RES_BASE := $(TARGET_NAME)
else
MK_RES_BASE := $(WINE_RC)
endif
endif
ifeq ($(TARGET_TYPE),proglib)
@ -170,14 +158,8 @@ ifeq ($(TARGET_TYPE),dynlink)
MK_DEFENTRY := _DllMain@12
MK_DDKLIBS :=
MK_SDKLIBS :=
ifneq ($(WINE_MODE),yes)
MK_CFLAGS := -I.
MK_CPPFLAGS := -I.
else
MK_CFLAGS := -I$(PATH_TO_TOP)/include/wine -I. -I$(WINE_INCLUDE)
MK_CPPFLAGS := -I$(PATH_TO_TOP)/include/wine -I. -I$(WINE_INCLUDE)
MK_RCFLAGS := --include-dir $(PATH_TO_TOP)/include/wine --include-dir $(WINE_INCLUDE)
endif
MK_IMPLIB := yes
MK_IMPLIBONLY := no
MK_IMPLIBDEFPATH := $(SDK_PATH_LIB)
@ -185,11 +167,7 @@ endif
MK_INSTALLDIR := system32
MK_BOOTCDDIR := system32
MK_DISTDIR := dlls
ifeq ($(WINE_RC),)
MK_RES_BASE := $(TARGET_NAME)
else
MK_RES_BASE := $(WINE_RC)
endif
endif
ifeq ($(TARGET_TYPE),library)
@ -223,6 +201,7 @@ ifeq ($(TARGET_TYPE),kmlibrary)
MK_IMPLIBDEFPATH := $(DDK_PATH_LIB)
#MK_IMPLIB_EXT :=
endif
ifeq ($(TARGET_TYPE),driver_library)
MK_MODE := kernel
MK_EXETYPE := dll