Linker complaints if linked modules have conflicting options.
[fw/sdcc] / as / mcs51 / aslink.h
index 9ce5dc4c6f4984c3ba1402dc7bff8f9149c438d3..263467a07e5d0c3df7609e366ae13a53c4bf05e9 100644 (file)
 #endif
 
 /*
- * PATH_AMX
+ * PATH_MAX
  */
 #include <limits.h>
 #ifndef PATH_MAX               /* POSIX, but not required   */
-#define PATH_MAX 255           /* define a reasonable value */
+ #if defined(__BORLANDC__) || defined(_MSC_VER)
+  #include <stdlib.h>
+  #define PATH_MAX     _MAX_PATH
+ #else
+  #define PATH_MAX     255     /* define a reasonable value */
+ #endif
 #endif
 
 /*
@@ -428,6 +433,7 @@ struct lbfile {
        char            *libspc;
        char            *relfil;
        char            *filspc;
+       long            offset; /*>=0 if rel file is embedded in a lib file at this offset*/
 };
 
 /*
@@ -449,10 +455,14 @@ extern    char    *rp;            /*      pointer into the LST file
 extern char    rb[NINPUT];     /*      LST file text line being
                                 *      address relocated
                                 */
-extern char    ctype[];        /*      array of character types, one per
+extern unsigned char   ctype[];        /*      array of character types, one per
                                 *      ASCII character
                                 */
 
+extern char sdccopt[NINPUT];
+extern char sdccopt_module[NINPUT];
+extern char curr_module[NINPUT];
+
 /*
  *     Character Type Definitions
  */
@@ -617,6 +627,10 @@ extern     struct lbfile *lbfhead; /*      pointer to the first
                                 */
 extern Addr_T iram_size;       /*      internal ram size
                                 */
+extern long xram_size; /*      external ram size
+                                */
+extern long code_size; /*      code size
+                                */
 
 
 /* C Library function definitions */
@@ -641,6 +655,8 @@ extern      FILE *          afile();
 extern VOID            bassav();
 extern VOID            gblsav();
 extern VOID            iramsav();
+extern VOID            xramsav();
+extern VOID            codesav();
 extern VOID            iramcheck();
 extern VOID            link_main();
 extern VOID            lkexit();
@@ -729,7 +745,7 @@ extern      VOID            prntval();
 extern  int            lastExtendedAddress;
 
 /* lklibr.c */
-extern VOID            addfile();
+extern int             addfile();
 extern VOID            addlib();
 extern VOID            addpath();
 extern int             fndsym();
@@ -743,16 +759,17 @@ extern    VOID            s19();
 /* lkihx.c */
 extern VOID            ihx();
 extern VOID            ihxEntendedLinearAddress(Addr_T);
+extern VOID            newArea();
+
 /* lkstore.c */
 extern char            *StoreString( char *str );
 
 /* lknoice.c */
 extern void             DefineNoICE( char *name, Addr_T value, int page );
 
-/* JCF: lksmry.c */
+/* JCF: lkmem.c */
 extern int summary(struct area * xp);
 
-/* SD added this to change
-       strcmpi --> strcmp (strcmpi NOT ANSI) */
-#define strcmpi strcmp
-
+/* JCF: lkaomf51.c */
+extern void SaveLinkedFilePath(char * filepath);
+extern void CreateAOMF51(void);