Fix tests Makefiles on Windows

Compiled tcc.exe location is under $(top_srcdir)/win32
This commit is contained in:
Vlad Vissoultchev 2016-03-14 18:11:49 +02:00
parent 5175b1ad87
commit fa2472c172
3 changed files with 14 additions and 2 deletions

View file

@ -60,12 +60,13 @@ endif
# run local version of tcc with local libraries and includes # run local version of tcc with local libraries and includes
TCCFLAGS = -B$(TOP) -I$(TOP) -I$(top_srcdir) -I$(top_srcdir)/include -L$(TOP) TCCFLAGS = -B$(TOP) -I$(TOP) -I$(top_srcdir) -I$(top_srcdir)/include -L$(TOP)
TCC = $(TOP)/tcc $(TCCFLAGS)
ifdef CONFIG_WIN32 ifdef CONFIG_WIN32
TCCFLAGS = -B$(top_srcdir)/win32 -I$(top_srcdir) -I$(top_srcdir)/include -L$(TOP) TCCFLAGS = -B$(top_srcdir)/win32 -I$(top_srcdir) -I$(top_srcdir)/include -L$(TOP)
TCC = $(TOP)/win32/tcc $(TCCFLAGS)
endif endif
XTCCFLAGS = -B$(TOP) -B$(top_srcdir)/win32 -I$(TOP) -I$(top_srcdir) -I$(top_srcdir)/include XTCCFLAGS = -B$(TOP) -B$(top_srcdir)/win32 -I$(TOP) -I$(top_srcdir) -I$(top_srcdir)/include
TCC = $(TOP)/tcc $(TCCFLAGS)
RUN_TCC = $(NATIVE_DEFINES) -DONE_SOURCE -run $(top_srcdir)/tcc.c $(TCCFLAGS) RUN_TCC = $(NATIVE_DEFINES) -DONE_SOURCE -run $(top_srcdir)/tcc.c $(TCCFLAGS)
DISAS = objdump -d DISAS = objdump -d

View file

@ -2,9 +2,16 @@
# credits: 01..13.c from the pcc cpp-tests suite # credits: 01..13.c from the pcc cpp-tests suite
# #
TCC = ../../tcc TOP = ../..
include $(TOP)/Makefile
TCC = $(TOP)/tcc
TESTS = $(patsubst %.c,%.test,$(wildcard *.c)) TESTS = $(patsubst %.c,%.test,$(wildcard *.c))
ifdef CONFIG_WIN32
TCC = $(top_srcdir)/win32/tcc
endif
all test : $(TESTS) all test : $(TESTS)
%.test: %.c %.expect %.test: %.c %.expect

View file

@ -19,6 +19,10 @@ endif
TCC = $(TOP)/tcc $(TCCFLAGS) TCC = $(TOP)/tcc $(TCCFLAGS)
ifdef CONFIG_WIN32
TCC = $(top_srcdir)/win32/tcc $(TCCFLAGS)
endif
TESTS = $(patsubst %.c,%.test,$(wildcard *.c)) TESTS = $(patsubst %.c,%.test,$(wildcard *.c))
# 34_array_assignment.test -- array assignment is not in C standard # 34_array_assignment.test -- array assignment is not in C standard