Add rules to compile tests with MSVC.

This commit is contained in:
David Capello 2010-08-25 00:26:51 -03:00
parent 3f9e947ea9
commit 53a3c3cab1

View File

@ -246,3 +246,22 @@ $(ASE): $(ASE_DEPS) $(OBJ_DIR)/resources_win32.res
rm $@.manifest
endif
######################################################################
# Rules to make tests
src/tests/%$(EXE): src/tests/%.cpp $(COMMON_OBJS) $(THIRD_PARTY_LIBS)
$(CC) $(CFLAGS) -Foobj/msvc/test.obj -c $<
link $(LFLAGS) obj/msvc/test.obj $(COMMON_OBJS) $(THIRD_PARTY_LIBS) $(LIBS) -OUT:$@
tests: $(TESTS)
runtests: $(AUTOTESTS)
@-$(foreach TEST, $(AUTOTESTS), \
echo Running ./$(TEST) ... ; \
if ./$(TEST) ; then \
echo " - OK" ; \
else \
echo " - *FAIL*" ; \
fi ; \
)