mirror of
https://github.com/mirror/tinycc.git
synced 2024-12-26 03:50:07 +08:00
build: remove #include "config.h" from target dependent files
This is to make cross build of libtcc1.a easier.
This commit is contained in:
parent
c4eef48025
commit
9bd69bf49f
@ -1,8 +1,6 @@
|
||||
/* ---------------------------------------------- */
|
||||
/* alloca86-bt.S */
|
||||
|
||||
#include "../config.h"
|
||||
|
||||
.globl __bound_alloca
|
||||
|
||||
__bound_alloca:
|
||||
|
@ -1,8 +1,6 @@
|
||||
/* ---------------------------------------------- */
|
||||
/* alloca86.S */
|
||||
|
||||
#include "../config.h"
|
||||
|
||||
.globl alloca
|
||||
|
||||
alloca:
|
||||
|
@ -1,8 +1,6 @@
|
||||
/* ---------------------------------------------- */
|
||||
/* alloca86_64.S */
|
||||
|
||||
#include "../config.h"
|
||||
|
||||
.globl alloca
|
||||
|
||||
alloca:
|
||||
|
@ -4,50 +4,53 @@
|
||||
@set PROMPT=$G$S
|
||||
|
||||
echo>..\config.h #define TCC_VERSION "0.9.25"
|
||||
echo>>..\config.h #define TCC_TARGET_PE 1
|
||||
echo>>..\config.h #define CONFIG_TCCDIR "."
|
||||
echo>>..\config.h #define CONFIG_SYSROOT ""
|
||||
@set target=-DTCC_TARGET_PE -DTCC_TARGET_I386
|
||||
@set CC=gcc
|
||||
@set AR=ar
|
||||
|
||||
@if _%PROCESSOR_ARCHITEW6432%_==_AMD64_ goto x86_64
|
||||
@if _%PROCESSOR_ARCHITECTURE%_==_AMD64_ goto x86_64
|
||||
@goto tools
|
||||
|
||||
:x86_64
|
||||
echo>>..\config.h #define TCC_TARGET_X86_64 1
|
||||
@set P=x86_64-pc-mingw32-
|
||||
@set target=-DTCC_TARGET_PE -DTCC_TARGET_X86_64
|
||||
@set CC=x86_64-pc-mingw32-gCC
|
||||
@set AR=x86_64-pc-mingw32-ar
|
||||
@set S=_64
|
||||
@goto tools
|
||||
|
||||
:tools
|
||||
%P%gcc -Os tools/tiny_impdef.c -o tiny_impdef.exe -s
|
||||
%P%gcc -Os tools/tiny_libmaker.c -o tiny_libmaker.exe -s
|
||||
%CC% %target% -Os tools/tiny_impdef.c -o tiny_impdef.exe -s
|
||||
%CC% %target% -Os tools/tiny_libmaker.c -o tiny_libmaker.exe -s
|
||||
|
||||
:libtcc
|
||||
if not exist libtcc\nul mkdir libtcc
|
||||
copy ..\libtcc.h libtcc\libtcc.h
|
||||
%P%gcc -Os -fno-strict-aliasing ../libtcc.c -c -o libtcc.o
|
||||
%P%ar rcs libtcc/libtcc.a libtcc.o
|
||||
%CC% %target% -Os -fno-strict-aliasing ../libtcc.c -c -o libtcc.o
|
||||
%AR% rcs libtcc/libtcc.a libtcc.o
|
||||
|
||||
:tcc
|
||||
%P%gcc -Os -fno-strict-aliasing ../tcc.c -o tcc.exe -s -DTCC_USE_LIBTCC -ltcc -Llibtcc
|
||||
%CC% %target% -Os -fno-strict-aliasing ../tcc.c -o tcc.exe -s -DTCC_USE_LIBTCC -ltcc -Llibtcc
|
||||
|
||||
:copy_std_includes
|
||||
copy ..\include\*.h include
|
||||
|
||||
:libtcc1.a
|
||||
.\tcc -c lib/crt1.c
|
||||
.\tcc -c lib/wincrt1.c
|
||||
.\tcc -c lib/dllcrt1.c
|
||||
.\tcc -c lib/dllmain.c
|
||||
.\tcc -c ../lib/libtcc1.c
|
||||
.\tcc -c lib/chkstk.S
|
||||
.\tcc -c ../lib/alloca86%S%.S
|
||||
.\tcc %target% -c lib/crt1.c
|
||||
.\tcc %target% -c lib/wincrt1.c
|
||||
.\tcc %target% -c lib/dllcrt1.c
|
||||
.\tcc %target% -c lib/dllmain.c
|
||||
.\tcc %target% -c ../lib/libtcc1.c
|
||||
.\tcc %target% -c lib/chkstk.S
|
||||
.\tcc %target% -c ../lib/alloca86%S%.S
|
||||
|
||||
@set LIBFILES=crt1.o wincrt1.o dllcrt1.o dllmain.o chkstk.o libtcc1.o alloca86%S%.o
|
||||
|
||||
@if not _%P%==_ goto makelib
|
||||
.\tcc -c ../lib/alloca86-bt%S%.S
|
||||
.\tcc -c ../lib/bcheck.c
|
||||
.\tcc %target% -c ../lib/alloca86-bt%S%.S
|
||||
.\tcc %target% -c ../lib/bcheck.c
|
||||
|
||||
@set LIBFILES=%LIBFILES% alloca86-bt%S%.o bcheck.o
|
||||
|
||||
|
@ -1,8 +1,6 @@
|
||||
/* ---------------------------------------------- */
|
||||
/* chkstk86.s */
|
||||
|
||||
#include "../../config.h"
|
||||
|
||||
/* ---------------------------------------------- */
|
||||
#ifndef TCC_TARGET_X86_64
|
||||
/* ---------------------------------------------- */
|
||||
|
@ -26,7 +26,6 @@
|
||||
#include <windows.h>
|
||||
#include <stdio.h>
|
||||
#include <malloc.h>
|
||||
#include "../../config.h"
|
||||
|
||||
char *get_export_names(FILE *fp);
|
||||
#define tcc_free free
|
||||
|
@ -25,7 +25,6 @@
|
||||
#include <io.h> /* for mktemp */
|
||||
#endif
|
||||
|
||||
#include "../../config.h"
|
||||
#include "../../elf.h"
|
||||
|
||||
#define ARMAG "!<arch>\n"
|
||||
|
Loading…
Reference in New Issue
Block a user