diff options
| author | James Lyon <jamesly0n@hotmail.com> | 2013-04-18 17:27:34 +0100 |
|---|---|---|
| committer | James Lyon <jamesly0n@hotmail.com> | 2013-04-18 17:27:34 +0100 |
| commit | 2bbfaf436f937ace4809d84be812ea1ac7fd7352 (patch) | |
| tree | 6e4f3f80611a8a471b5e84f42e05d2fd30f57e73 /Makefile | |
| parent | ce5e12c2f950052d8109b6b7a56d900547705c08 (diff) | |
| download | tinycc-2bbfaf436f937ace4809d84be812ea1ac7fd7352.tar.gz tinycc-2bbfaf436f937ace4809d84be812ea1ac7fd7352.tar.bz2 | |
Tests in abitest.c now work on Win32.
I expect that Linux-x86 is probably fine. All other architectures
except ARM are definitely broken since I haven't yet implemented
gfunc_sret for these, although replicating the current behaviour
should be straightforward.
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 18 |
1 files changed, 16 insertions, 2 deletions
@@ -45,7 +45,13 @@ endif # make libtcc as static or dynamic library? ifdef DISABLE_STATIC +ifndef CONFIG_WIN32 LIBTCC=libtcc.so.1.0 +else +LIBTCC=libtcc.dll +LIBTCC_DLL=yes +LIBTCC_EXTRA=libtcc.def libtcc.a +endif LINK_LIBTCC=-Wl,-rpath,"$(libdir)" ifdef DISABLE_RPATH LINK_LIBTCC= @@ -126,7 +132,7 @@ ifdef CONFIG_USE_LIBGCC LIBTCC1= endif -TCCLIBS = $(LIBTCC1) $(LIBTCC) +TCCLIBS = $(LIBTCC1) $(LIBTCC) $(LIBTCC_EXTRA) TCCDOCS = tcc.1 tcc-doc.html tcc-doc.info ifdef CONFIG_CROSS @@ -185,14 +191,21 @@ endif $(LIBTCC_OBJ) tcc.o : %.o : %.c $(LIBTCC_INC) $(CC) -o $@ -c $< $(NATIVE_DEFINES) $(CPPFLAGS) $(CFLAGS) +ifndef LIBTCC_DLL libtcc.a: $(LIBTCC_OBJ) $(AR) rcs $@ $^ +endif libtcc.so.1.0: $(LIBTCC_OBJ) $(CC) -shared -Wl,-soname,$@ -o $@ $^ $(LDFLAGS) libtcc.so.1.0: CFLAGS+=-fPIC +ifdef LIBTCC_DLL +libtcc.dll libtcc.def libtcc.a: $(LIBTCC_OBJ) + $(CC) -shared $^ -o $@ $(LDFLAGS) -Wl,--output-def,libtcc.def,--out-implib,libtcc.a +endif + # windows utilities tiny_impdef$(EXESUF): win32/tools/tiny_impdef.c $(CC) -o $@ $< $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) @@ -286,7 +299,8 @@ install: $(PROGS) $(TCCLIBS) $(TCCDOCS) cp -r $(top_srcdir)/win32/examples/. "$(tccdir)/examples" $(INSTALL) -m644 $(addprefix $(top_srcdir)/include/,$(TCC_INCLUDES)) "$(tccdir)/include" $(INSTALL) -m644 tcc-doc.html $(top_srcdir)/win32/tcc-win32.txt "$(tccdir)/doc" - $(INSTALL) -m644 $(LIBTCC) $(top_srcdir)/libtcc.h "$(tccdir)/libtcc" + $(INSTALL) -m644 $(top_srcdir)/libtcc.h $(LIBTCC_EXTRA) "$(tccdir)/libtcc" + $(INSTALL) -m644 $(LIBTCC) $(tccdir) ifdef CONFIG_CROSS mkdir -p "$(tccdir)/lib/32" mkdir -p "$(tccdir)/lib/64" |
