Run rsym on images
authorCasper Hornstrup <chorns@users.sourceforge.net>
Sun, 6 Mar 2005 21:24:06 +0000 (21:24 +0000)
committerCasper Hornstrup <chorns@users.sourceforge.net>
Sun, 6 Mar 2005 21:24:06 +0000 (21:24 +0000)
svn path=/branches/xmlbuildsystem/; revision=13861

reactos/Makefile
reactos/tools/Makefile
reactos/tools/rbuild/backend/mingw/mingw.cpp
reactos/tools/rbuild/backend/mingw/modulehandler.cpp

index f738f7c..5c8ca6c 100644 (file)
@@ -61,9 +61,8 @@ PREAUTO := \
        lib$(SEP)kernel32$(SEP)errcodes.rc
 
 Makefile.auto: $(RMKDIR_TARGET) $(BUILDNO_TARGET) $(NCI_SERVICE_FILES) $(WMC_TARGET) $(WRC_TARGET) \
-               $(CDMAKE_TARGET) $(RBUILD_TARGET) $(PREAUTO)
+               $(RSYM_TARGET) $(CDMAKE_TARGET) $(RBUILD_TARGET) $(PREAUTO)
        tools$(SEP)rbuild$(SEP)rbuild$(EXEPOSTFIX) mingw
-#      $(MAKE) $(MAKECMDGOALS)
 
 
 include$(SEP)reactos$(SEP)bugcodes.h ntoskrnl$(SEP)bugcodes.rc: $(WMC_TARGET) ntoskrnl$(SEP)ntoskrnl.mc
index e121ae1..8d28d8d 100644 (file)
@@ -24,6 +24,33 @@ rmkdir_clean:
        -@$(rm) $(RMKDIR_TARGET) $(RMKDIR_OBJECTS) 2>$(NUL)
 clean: rmkdir_clean
 
+
+RSYM_BASE = tools
+
+RSYM_TARGET = \
+       $(ROS_INTERMEDIATE)$(RSYM_BASE)$(SEP)rsym$(EXEPOSTFIX)
+
+RSYM_SOURCES = \
+       $(RSYM_BASE)$(SEP)rsym.c
+
+RSYM_OBJECTS = \
+       $(RSYM_SOURCES:.c=.o)
+
+RSYM_HOST_CFLAGS = -g -Werror -Wall
+
+RSYM_HOST_LFLAGS = -g
+
+$(RSYM_TARGET): $(RSYM_OBJECTS)
+       ${host_gcc} $(RSYM_OBJECTS) $(RSYM_HOST_LFLAGS) -o $(RSYM_TARGET)
+
+$(RSYM_OBJECTS): %.o : %.c
+       ${host_gcc} $(RSYM_HOST_CFLAGS) -c $< -o $@
+
+.PHONY: rsym_clean
+rsym_clean:
+       -@$(rm) $(RSYM_TARGET) $(RSYM_OBJECTS) 2>$(NUL)
+clean: rsym_clean
+
 include tools/buildno/Makefile
 include tools/cdmake/makefile
 include tools/nci/makefile
index fa848a5..2eb4de2 100644 (file)
@@ -167,6 +167,7 @@ MingwBackend::GenerateGlobalVariables () const
        fprintf ( fMakefile, "bin2res = tools" SSEP "bin2res" SSEP "bin2res" EXEPOSTFIX "\n" );\r
        fprintf ( fMakefile, "cabman = tools" SSEP "cabman" SSEP "cabman" EXEPOSTFIX "\n" );\r
        fprintf ( fMakefile, "cdmake = tools" SSEP "cdmake" SSEP "cdmake" EXEPOSTFIX "\n" );\r
+       fprintf ( fMakefile, "rsym = tools" SSEP "rsym" EXEPOSTFIX "\n" );\r
        fprintf ( fMakefile, "wrc = tools" SSEP "wrc" SSEP "wrc" EXEPOSTFIX "\n" );\r
        fprintf ( fMakefile, "\n" );\r
        GenerateGlobalCFlagsAndProperties (\r
index 03aa066..e669bb6 100644 (file)
@@ -865,6 +865,11 @@ MingwModuleHandler::GenerateLinkerCommand ( const Module& module,
                          importLibraryDependencies.c_str (),\r
                          GetLinkerMacro ( module ).c_str () );\r
        }\r
+\r
+       fprintf ( fMakefile,\r
+                     "\t${rsym} %s %s\n",\r
+                     target.c_str (),\r
+                     target.c_str () );\r
 }\r
 \r
 void\r
@@ -1402,6 +1407,10 @@ MingwKernelModuleHandler::GenerateKernelModuleTarget ( const Module& module )
        fprintf ( fMakefile,\r
                  "\t${rm} %s\n\n",\r
                  temp_exp.c_str () );\r
+       fprintf ( fMakefile,\r
+                     "\t${rsym} %s %s\n",\r
+                     target.c_str (),\r
+                     target.c_str () );\r
 }\r
 \r
 \r