Browse Source

Add --pack switch (currently does nothing).

git-svn-id: file:///var/svn/tigccpp/trunk/tigcc/ld-tigcc@1142 9552661e-59e3-4036-b4f2-dbe53926924f
kevinkofler 17 years ago
parent
commit
5fddb4076a
5 changed files with 17 additions and 2 deletions
  1. 1 1
      Makefile
  2. 5 0
      export/export.c
  3. 3 0
      export/export.h
  4. 1 1
      generic.h
  5. 7 0
      main_opt.inc

+ 1 - 1
Makefile

@@ -18,7 +18,7 @@ CC = gcc
 CFLAGS = -s -Os -fno-exceptions
 WARN_CFLAGS = -W -Wall -Wwrite-strings -Wpointer-arith
 DEFINES = -DCOFF_SUPPORT -DAMIGAOS_SUPPORT -DTIOS_SUPPORT -DFLASH_OS_SUPPORT -DNOSTUB_DLL_SUPPORT -DFARGO_SUPPORT -DDATA_VAR_SUPPORT -DTIOS_FILE_SUPPORT -DTIOS_UPGRADE_FILE_SUPPORT -DDEBUGGING_INFO_SUPPORT -DCOFF_TIGCC_EXTENSIONS -DAMIGAOS_TIGCC_EXTENSIONS
-EXE_DEFINES = -DENABLE_HELP -DENABLE_STATS -DENABLE_DUMP
+EXE_DEFINES = -DPUCRUNCH_SUPPORT -DENABLE_HELP -DENABLE_STATS -DENABLE_DUMP
 
 RM = rm
 RMFLAGS = -f

+ 5 - 0
export/export.c

@@ -276,6 +276,11 @@ char ProgramFolder[MAX_NAME_LEN+1] = "main", ProgramName[MAX_NAME_LEN+1] = "prog
 char DataFolder[MAX_NAME_LEN+1] = "", DataName[MAX_NAME_LEN+1] = "data";
 #endif /* DATA_VAR_SUPPORT */
 
+#ifdef PUCRUNCH_SUPPORT
+// Specifies whether to pack the main file with pucrunch.
+BOOLEAN Pack = FALSE;
+#endif /* PUCRUNCH_SUPPORT */
+
 // Specifies whether to output only the binary image of the program.
 BOOLEAN OutputBin = FALSE;
 // Specifies whether to output only the binary image of the main file.

+ 3 - 0
export/export.h

@@ -37,6 +37,9 @@ extern char ProgramFolder[MAX_NAME_LEN+1], ProgramName[MAX_NAME_LEN+1];
 #ifdef DATA_VAR_SUPPORT
 extern char DataFolder[MAX_NAME_LEN+1], DataName[MAX_NAME_LEN+1];
 #endif /* DATA_VAR_SUPPORT */
+#ifdef PUCRUNCH_SUPPORT
+extern BOOLEAN Pack;
+#endif /* PUCRUNCH_SUPPORT */
 extern BOOLEAN OutputBin;
 extern BOOLEAN OutputBinMainOnly;
 BOOLEAN GetOutputFile (INT_EXP_FILE *File, SIZE FileSize, unsigned int DestCalc, unsigned int FileRole, unsigned int FileFormat, unsigned int FileType, const char *Extension, BOOLEAN Executable, I4 *EffectiveSize);

+ 1 - 1
generic.h

@@ -66,7 +66,7 @@ TIOS_UPGRADE_FILE_SUPPORT
 #define GENERIC_H
 
 // This defines the current version of ld-tigcc and ar-tigcc.
-#define PROGRAM_VERSION_STRING "1.07"
+#define PROGRAM_VERSION_STRING "1.08"
 #define COPYRIGHT_NOTICE_STRING "Copyright (C) 2002-2007 Sebastian Reichelt, Kevin Kofler and Billy Charvet"
 
 // Handling of user-defined functionality dependencies.

+ 7 - 0
main_opt.inc

@@ -97,6 +97,9 @@
 					        "     --data-var-copy={never|archived|always}\n"
 					        "                          Work on original data variable or copy\n"
 #endif /* DATA_VAR_SUPPORT */
+#ifdef PUCRUNCH_SUPPORT
+					        "  --pack                  Compress main file with pucrunch\n"
+#endif /* PUCRUNCH_SUPPORT */
 					        "<file> can be an archive or an object file.\n"
 					        "Options marked with `(!)' are likely to cause errors in binary code.\n");
 					goto Cleanup;
@@ -326,6 +329,10 @@
 						Error (NULL, "Unrecognized copying condition `%s'.", Arg);
 				}
 #endif /* DATA_VAR_SUPPORT */
+#ifdef PUCRUNCH_SUPPORT
+				else if (ArgMatches ("pack"))
+					Pack = TRUE;
+#endif /* PUCRUNCH_SUPPORT */
 				else
 					Error (NULL, "Unrecognized option `%s'.", Args [CurArg]);
 			}