History

Summary of commits + added some brief comments to Makefile

Summary of what was changed or added so far: These won't work on Win32 * --disable-static option builds libtcca.so.1.0 and associated simlinks. This replaces libtcca.a, which is a static library with a dynamic one. * --with-selinux option uses mmap to enable tcc -run to work with Selinux. * attempt to build tcc1.def on i386 / x86_64 when --enable-cross is used. If successful, this gets around the "_start not found" or "_winstart not found" messages when i386-win32-tcc is run on these systems. I say "if" because it gave me fits of trouble on my system and not all others have been tested yet. tcc1.def is not a real .def file by the way, but it works, so it's kind of a dancing bear at this point. We're not concerned that it's getting the steps wrong. We're just happy it's not eating us for lunch.

Henry Kroll III committed 16 years ago

Commit 209caee1 parent ac0b7d81 file · +10 −5Browse files

Unified · Split

Makefile+10−5
@@ -114,22 +114,24 @@ endif · 113 unmodified lines
114endif114endif
115endif115endif
116 116
117# LIBTCCB decides whether libtcc is installed static or dynamic
117LIBTCCB=libtcc.a118LIBTCCB=libtcc.a
118ifdef DISABLE_STATIC119ifdef DISABLE_STATIC
119CFLAGS+=-fPIC120CFLAGS+=-fPIC
120LIBTCCL=-L. -ltcc121LIBTCCL=-L. -ltcc
121LIBTCCB=libtcc.so.1.0122LIBTCCB=libtcc.so.1.0
122endif123endif
123LIBTCCPROGS=$(LIBTCCB)124LIBTCCLIBS=$(LIBTCCB)
124 125
125ifdef CONFIG_CROSS126ifdef CONFIG_CROSS
126PROGS+=$(PROGS_CROSS)127PROGS+=$(PROGS_CROSS)
128# Try to build win32 cross-compiler lib on *nix
127ifndef CONFIG_WIN32129ifndef CONFIG_WIN32
128LIBTCCPROGS+=tcc1.def130LIBTCCLIBS+=tcc1.def
129endif131endif
130endif132endif
131 133
132all: $(PROGS) $(LIBTCC1) $(BCHECK_O) $(LIBTCCPROGS) tcc-doc.html tcc.1 libtcc_test$(EXESUF)134all: $(PROGS) $(LIBTCC1) $(BCHECK_O) $(LIBTCCLIBS) tcc-doc.html tcc.1 libtcc_test$(EXESUF)
133 135
134# Host Tiny C Compiler136# Host Tiny C Compiler
135tcc$(EXESUF): tcc.o $(LIBTCCB)137tcc$(EXESUF): tcc.o $(LIBTCCB)
@@ -182,7 +184,10 @@ libtcc.so.1.0: $(LIBTCC_OBJ) · 46 unmodified lines
182 184
183libtcc_test$(EXESUF): tests/libtcc_test.c $(LIBTCCB)185libtcc_test$(EXESUF): tests/libtcc_test.c $(LIBTCCB)
184 $(CC) -o $@ $^ -I. $(CFLAGS) $(LIBS) $(LIBTCCL)186 $(CC) -o $@ $^ -I. $(CFLAGS) $(LIBS) $(LIBTCCL)
185 187
188# To build cross-compilers on Linux we must make a fake 32 bit tcc.exe
189# and use it to build ELF objects into libtcc1.a which is then
190# renamed to tcc1.def in order to have another target in the Makefile
186tcc1.def:191tcc1.def:
187 mv config.mak config.mak.bak192 mv config.mak config.mak.bak
188 mv config.h config.h.bak193 mv config.h config.h.bak
@@ -240,7 +245,7 @@ TCC_INCLUDES = stdarg.h stddef.h stdbool.h float.h varargs.h tcclib.h · 51 unmodified lines
240INSTALL=install245INSTALL=install
241 246
242ifndef CONFIG_WIN32247ifndef CONFIG_WIN32
243install: $(PROGS) $(LIBTCC1) $(BCHECK_O) $(LIBTCCPROGS) tcc.1 tcc-doc.html248install: $(PROGS) $(LIBTCC1) $(BCHECK_O) $(LIBTCCLIBS) tcc.1 tcc-doc.html
244 mkdir -p "$(bindir)"249 mkdir -p "$(bindir)"
245 $(INSTALL) -s -m755 $(PROGS) "$(bindir)"250 $(INSTALL) -s -m755 $(PROGS) "$(bindir)"
246 mkdir -p "$(mandir)/man1"251 mkdir -p "$(mandir)/man1"