- Fixed the makefiles for the build on windows.

svn path=/trunk/; revision=9593
This commit is contained in:
Hartmut Birr 2004-06-02 20:26:08 +00:00
parent 739c9c2b0a
commit 26916eed77
4 changed files with 69 additions and 70 deletions

View file

@ -17,7 +17,7 @@
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
# #
BOOTCD_DIR = ..$(SEP)..$(SEP)bootcd BOOTCD_DIR = ../../bootcd
.PHONY : clean bootcd .PHONY : clean bootcd
@ -55,20 +55,20 @@ ext2.bin : ext2.asm
.PHONY : bootcd .PHONY : bootcd
bootcd: bootcd_dirs isoboot.bin bootcd: bootcd_dirs isoboot.bin
$(CP) isoboot.bin $(BOOTCD_DIR) $(CP) isoboot.bin $(BOOTCD_DIR)
$(CP) dosmbr.bin $(BOOTCD_DIR)$(SEP)disk$(SEP)loader $(CP) dosmbr.bin $(BOOTCD_DIR)/disk/loader
$(CP) ext2.bin $(BOOTCD_DIR)$(SEP)disk$(SEP)loader $(CP) ext2.bin $(BOOTCD_DIR)/disk/loader
$(CP) fat.bin $(BOOTCD_DIR)$(SEP)disk$(SEP)loader $(CP) fat.bin $(BOOTCD_DIR)/disk/loader
$(CP) fat32.bin $(BOOTCD_DIR)$(SEP)disk$(SEP)loader $(CP) fat32.bin $(BOOTCD_DIR)/disk/loader
$(CP) isoboot.bin $(BOOTCD_DIR)$(SEP)disk$(SEP)loader $(CP) isoboot.bin $(BOOTCD_DIR)/disk/loader
.PHONY : bootcd_dirs .PHONY : bootcd_dirs
bootcd_dirs: bootcd_dirs:
$(MKDIR) $(BOOTCD_DIR) $(MKDIR) $(BOOTCD_DIR)
$(MKDIR) $(BOOTCD_DIR)$(SEP)disk $(MKDIR) $(BOOTCD_DIR)/disk
$(MKDIR) $(BOOTCD_DIR)$(SEP)disk$(SEP)reactos $(MKDIR) $(BOOTCD_DIR)/disk/reactos
$(MKDIR) $(BOOTCD_DIR)$(SEP)disk$(SEP)install $(MKDIR) $(BOOTCD_DIR)/disk/install
$(MKDIR) $(BOOTCD_DIR)$(SEP)disk$(SEP)bootdisk $(MKDIR) $(BOOTCD_DIR)/disk/bootdisk
$(MKDIR) $(BOOTCD_DIR)$(SEP)disk$(SEP)loader $(MKDIR) $(BOOTCD_DIR)/disk/loader
clean: clean:
@-$(RM) *.bin @-$(RM) *.bin

View file

@ -27,33 +27,33 @@ TARGET = i386
DEBUG = no DEBUG = no
OBJDIR = obj OBJDIR = obj
OUTPUT_DIR = $(OBJDIR)$(SEP)$(TARGET) OUTPUT_DIR = $(OBJDIR)/$(TARGET)
BOOTCD_DIR = ..$(SEP)..$(SEP)bootcd BOOTCD_DIR = ../../bootcd
############################################# #############################################
# COMPILER AND LINKER PROGRAMS # COMPILER AND LINKER PROGRAMS
# #
TOOLSDIR = $(SRCDIR)$(SEP)..$(SEP)tools TOOLSDIR = $(SRCDIR)/../tools
RM = $(TOOLSDIR)$(SEP)rdel RM = $(subst /,$(SEP),$(TOOLSDIR))$(SEP)rdel
CP = $(TOOLSDIR)$(SEP)rcopy CP = $(subst /,$(SEP),$(TOOLSDIR))$(SEP)rcopy
MKDIR = $(TOOLSDIR)$(SEP)rmkdir MKDIR = $(subst /,$(SEP),$(TOOLSDIR))$(SEP)rmkdir
RMDIR = $(TOOLSDIR)$(SEP)rrmdir RMDIR = $(subst /,$(SEP),$(TOOLSDIR))$(SEP)rrmdir
NASM_CMD = nasm NASM_CMD = nasm
OBJCOPY = objcopy OBJCOPY = objcopy
DEPTOOL = $(TOOLSDIR)$(SEP)deptool DEPTOOL = $(subst /,$(SEP),$(TOOLSDIR))$(SEP)deptool
HOSTTOOL = $(TOOLSDIR)$(SEP)hosttype HOSTTOOL = $(subst /,$(SEP),$(TOOLSDIR))$(SEP)hosttype
TOOLS = $(DEPTOOL) $(HOSTTOOL) TOOLS = $(DEPTOOL) $(HOSTTOOL)
HOSTTYPE = $(shell $(HOSTTOOL)) HOSTTYPE = $(shell $(HOSTTOOL))
#----------------------------------------------------------------------------------------------------- #-----------------------------------------------------------------------------------------------------
# TEST IF WE ARE IN THE TARGET DIRECTORY # TEST IF WE ARE IN THE TARGET DIRECTORY
# IF NOT WE WILL CHANGE TO THE TARGET DIRECTORY AND RUN MAKE FROM THERE # IF NOT WE WILL CHANGE TO THE TARGET DIRECTORY AND RUN MAKE FROM THERE
#----------------------------------------------------------------------------------------------------- #-----------------------------------------------------------------------------------------------------
#ifeq (,$(filter $(CURDIR)$(SEP)$(OUTPUT_DIR),$(notdir $(CURDIR)))) #ifeq (,$(filter $(CURDIR)/$(OUTPUT_DIR),$(notdir $(CURDIR))))
ifneq ($(CURDIR), $(SRCDIR)$(SEP)$(OUTPUT_DIR)) ifneq ($(CURDIR), $(SRCDIR)/$(OUTPUT_DIR))
SRCDIR = $(CURDIR) SRCDIR = $(CURDIR)
@ -63,10 +63,10 @@ SRCDIR = $(CURDIR)
# VARIABLE TO CHANGE TO TARGET DIRECTORY AND INVOKE MAKE FROM THERE # VARIABLE TO CHANGE TO TARGET DIRECTORY AND INVOKE MAKE FROM THERE
# #
MAKETARGET = $(MAKE) --no-print-directory -C $(OUTPUT_DIR) \ MAKETARGET = $(MAKE) --no-print-directory -C $(OUTPUT_DIR) \
-f ..$(SEP)..$(SEP)Makefile SRCDIR=$(CURDIR) $(MAKECMDGOALS) -f ../../Makefile SRCDIR=$(CURDIR) $(MAKECMDGOALS)
.PHONY: CHANGE_TO_TARGET .PHONY: CHANGE_TO_TARGET
CHANGE_TO_TARGET setupldr : BUILD_TOOLS $(OBJDIR) $(OBJDIR)$(SEP)$(TARGET) CHANGE_TO_TARGET setupldr : BUILD_TOOLS $(OBJDIR) $(OBJDIR)/$(TARGET)
@echo Calculating source file dependencies... @echo Calculating source file dependencies...
+@$(MAKETARGET) +@$(MAKETARGET)
@ -78,9 +78,9 @@ $(OBJDIR):
@echo Creating directory: $(OBJDIR) @echo Creating directory: $(OBJDIR)
@$(MKDIR) $(OBJDIR) @$(MKDIR) $(OBJDIR)
$(OBJDIR)$(SEP)$(TARGET): $(OBJDIR) $(OBJDIR)/$(TARGET): $(OBJDIR)
@echo Creating directory: $(OBJDIR)$(SEP)$(TARGET) @echo Creating directory: $(OBJDIR)/$(TARGET)
@$(MKDIR) $(OBJDIR)$(SEP)$(TARGET) @$(MKDIR) $(OBJDIR)/$(TARGET)
Makefile : ; Makefile : ;
@ -92,10 +92,10 @@ Makefile : ;
.PHONY : clean .PHONY : clean
clean: clean:
@$(MAKE) --no-print-directory -C $(TOOLSDIR) @$(MAKE) --no-print-directory -C $(TOOLSDIR)
@echo Cleaning directory $(OBJDIR)$(SEP)$(TARGET) @echo Cleaning directory $(OBJDIR)/$(TARGET)
@-$(RM) $(OBJDIR)$(SEP)$(TARGET)$(SEP)* @-$(RM) $(OBJDIR)/$(TARGET)/*
@echo Removing directory $(OBJDIR)$(SEP)$(TARGET) @echo Removing directory $(OBJDIR)/$(TARGET)
@-$(RMDIR) $(OBJDIR)$(SEP)$(TARGET) @-$(RMDIR) $(OBJDIR)/$(TARGET)
@-$(RMDIR) $(OBJDIR) @-$(RMDIR) $(OBJDIR)
@echo Clean ALL done. @echo Clean ALL done.
@ -107,20 +107,20 @@ bootcd : bootcd_dirs setup_loader boot_loader
.PHONY : bootcd_dirs .PHONY : bootcd_dirs
bootcd_dirs: bootcd_dirs:
$(MKDIR) $(BOOTCD_DIR) $(MKDIR) $(BOOTCD_DIR)
$(MKDIR) $(BOOTCD_DIR)$(SEP)disk $(MKDIR) $(BOOTCD_DIR)/disk
$(MKDIR) $(BOOTCD_DIR)$(SEP)disk$(SEP)reactos $(MKDIR) $(BOOTCD_DIR)/disk/reactos
$(MKDIR) $(BOOTCD_DIR)$(SEP)disk$(SEP)install $(MKDIR) $(BOOTCD_DIR)/disk/install
$(MKDIR) $(BOOTCD_DIR)$(SEP)disk$(SEP)bootdisk $(MKDIR) $(BOOTCD_DIR)/disk/bootdisk
$(MKDIR) $(BOOTCD_DIR)$(SEP)disk$(SEP)loader $(MKDIR) $(BOOTCD_DIR)/disk/loader
.PHONY : boot_loader .PHONY : boot_loader
boot_loader : $(OBJDIR)$(SEP)$(TARGET)$(SEP)freeldr.sys boot_loader : $(OBJDIR)/$(TARGET)/freeldr.sys
$(CP) $(OBJDIR)$(SEP)$(TARGET)$(SEP)freeldr.sys $(BOOTCD_DIR)$(SEP)disk$(SEP)loader$(SEP)freeldr.sys $(CP) $(OBJDIR)/$(TARGET)/freeldr.sys $(BOOTCD_DIR)/disk/loader/freeldr.sys
$(CP) ..$(SEP)freeldr.ini $(BOOTCD_DIR)$(SEP)disk$(SEP)loader$(SEP)freeldr.ini $(CP) ../freeldr.ini $(BOOTCD_DIR)/disk/loader/freeldr.ini
.PHONY : setup_loader .PHONY : setup_loader
setup_loader : $(OBJDIR)$(SEP)$(TARGET)$(SEP)setupldr.sys setup_loader : $(OBJDIR)/$(TARGET)/setupldr.sys
$(CP) $(OBJDIR)$(SEP)$(TARGET)$(SEP)setupldr.sys $(BOOTCD_DIR)$(SEP)disk$(SEP)loader$(SEP)setupldr.sys $(CP) $(OBJDIR)/$(TARGET)/setupldr.sys $(BOOTCD_DIR)/disk/loader/setupldr.sys
############################################# #############################################
@ -149,7 +149,7 @@ COMPILER_DEFINES = -D__$(TARGET)__ $(COMPILER_DEBUG_DEFINES)
############################################# #############################################
# INCLUDE DIRECTORY OPTIONS # INCLUDE DIRECTORY OPTIONS
# #
COMPILER_INCLUDES = -I$(SRCDIR)$(SEP)include COMPILER_INCLUDES = -I$(SRCDIR)/include
############################################# #############################################
# COMPILER FLAGS # COMPILER FLAGS
@ -321,21 +321,21 @@ ALL_OBJS = $(COMMON_OBJS) \
############################################# #############################################
# SET THE VPATH SO MAKE CAN FIND THE SOURCE FILES # SET THE VPATH SO MAKE CAN FIND THE SOURCE FILES
# #
VPATH = $(SRCDIR)$(SEP) \ VPATH = $(SRCDIR)/ \
$(SRCDIR)$(SEP)arch$(SEP)$(TARGET) \ $(SRCDIR)/arch/$(TARGET) \
$(SRCDIR)$(SEP)rtl \ $(SRCDIR)/rtl \
$(SRCDIR)$(SEP)fs \ $(SRCDIR)/fs \
$(SRCDIR)$(SEP)ui \ $(SRCDIR)/ui \
$(SRCDIR)$(SEP)reactos \ $(SRCDIR)/reactos \
$(SRCDIR)$(SEP)comm \ $(SRCDIR)/comm \
$(SRCDIR)$(SEP)disk \ $(SRCDIR)/disk \
$(SRCDIR)$(SEP)mm \ $(SRCDIR)/mm \
$(SRCDIR)$(SEP)cache \ $(SRCDIR)/cache \
$(SRCDIR)$(SEP)inifile \ $(SRCDIR)/inifile \
$(SRCDIR)$(SEP)inffile \ $(SRCDIR)/inffile \
$(SRCDIR)$(SEP)video \ $(SRCDIR)/video \
$(SRCDIR)$(SEP)math \ $(SRCDIR)/math \
$(SRCDIR)$(SEP)include $(SRCDIR)/include
############################################# #############################################

View file

@ -25,10 +25,10 @@ LIBS = -lkernel32
.PHONY : clean .PHONY : clean
all: ..$(SEP)bootsect$(SEP)fat.h ..$(SEP)bootsect$(SEP)fat32.h install.exe all: ../bootsect/fat.h ../bootsect/fat32.h install.exe
..$(SEP)bootsect$(SEP)fat.h ..$(SEP)bootsect$(SEP)fat32.h : ../bootsect/fat.h ../bootsect/fat32.h :
@$(MAKE) --no-print-directory -C ..$(SEP)bootsect @$(MAKE) --no-print-directory -C ../bootsect
install.exe: $(OBJS) install.exe: $(OBJS)
@echo ===================================================== LINKING install @echo ===================================================== LINKING install

View file

@ -31,13 +31,13 @@ endif
############################################# #############################################
TOOLS = deptool \ TOOLS = deptool$(EXE_POSTFIX) \
bin2c \ bin2c$(EXE_POSTFIX) \
hosttype \ hosttype$(EXE_POSTFIX) \
rdel \ rdel$(EXE_POSTFIX) \
rcopy \ rcopy$(EXE_POSTFIX) \
rmkdir \ rmkdir$(EXE_POSTFIX) \
rrmdir rrmdir$(EXE_POSTFIX)
############################################# #############################################
@ -48,7 +48,7 @@ all : $(TOOLS)
############################################# #############################################
%: %.c %$(EXE_POSTFIX): %.c
@echo ===================================================== Compiling $* @echo ===================================================== Compiling $*
@$(CC) -Wall -O3 -o $@ $< @$(CC) -Wall -O3 -o $@ $<
@ -58,5 +58,4 @@ all : $(TOOLS)
.PHONY : clean .PHONY : clean
clean: clean:
@-$(RM) $(TOOLS) @-$(RM) $(TOOLS)
@-$(RM) *.exe
@echo Clean ALL done. @echo Clean ALL done.