From cf4e57281b867878521d6f38ec5b0f552c4d2c90 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 28 Sep 2010 10:50:05 +0200 Subject: midltests: move the current implementation to midltests_simple.exe metze --- testprogs/win32/midltests/Makefile | 29 +++++-------------- testprogs/win32/midltests/Makefile.simple | 27 ++++++++++++++++++ testprogs/win32/midltests/midltests.c | 42 ---------------------------- testprogs/win32/midltests/midltests_simple.c | 42 ++++++++++++++++++++++++++++ 4 files changed, 76 insertions(+), 64 deletions(-) create mode 100644 testprogs/win32/midltests/Makefile.simple delete mode 100644 testprogs/win32/midltests/midltests.c create mode 100644 testprogs/win32/midltests/midltests_simple.c (limited to 'testprogs/win32') diff --git a/testprogs/win32/midltests/Makefile b/testprogs/win32/midltests/Makefile index 535968b16d..6eeadeb7b7 100644 --- a/testprogs/win32/midltests/Makefile +++ b/testprogs/win32/midltests/Makefile @@ -1,27 +1,12 @@ -INCLUDES=-I -CFLAGS=$(INCLUDES) -Zi -D_WIN32_WINNT=0x502 -LIBS=rpcrt4.lib -all: midltests.exe +all: + @echo "nmake targets:" + @echo " clean" + @echo " simple" clean: - del *~ *.obj *.exe midltests.h midltests_s.c midltests_c.c + @call nmake /f Makefile.simple /NOLOGO clean -#MIDL_ARGS=/target NT50 -MIDL_ARGS=/Os /prefix client cli_ /prefix server srv_ /prefix switch swi_ -midltests.h midltests_s.c midltests_c.c: midltests.idl midltests.acf - midl $(MIDL_ARGS) /acf midltests.acf midltests.idl +simple: + @call nmake /f Makefile.simple /NOLOGO all -MIDLTESTS_OBJ = midltests.obj midltests_s_m.obj midltests_c_m.obj midltests_marshall.obj utils.obj -midltests.exe: $(MIDLTESTS_OBJ) - $(CC) -o midltests.exe $(MIDLTESTS_OBJ) $(LIBS) - -midltests.obj: midltests.h midltests.idl -midltests_c_m.c: midltests_c.c -midltests_s_m.c: midltests_s.c - -midltests.obj: midltests.h midltests.idl midltests.c -midltests_s_m.obj: midltests_marshall.h midltests_s.c midltests_s_m.c -midltests_c_m.obj: midltests_marshall.h midltests_c.c midltests_c_m.c -midltests_marshall.obj: midltests.h midltests_marshall.c -utils.obj: midltests.h utils.c diff --git a/testprogs/win32/midltests/Makefile.simple b/testprogs/win32/midltests/Makefile.simple new file mode 100644 index 0000000000..ec4a54294c --- /dev/null +++ b/testprogs/win32/midltests/Makefile.simple @@ -0,0 +1,27 @@ +INCLUDES=-I +CFLAGS=$(INCLUDES) -Zi -D_WIN32_WINNT=0x502 +LIBS=rpcrt4.lib + +all: midltests_simple.exe + +clean: + del *~ *.obj *.exe midltests.h midltests_s.c midltests_c.c + +#MIDL_ARGS=/target NT50 +MIDL_ARGS=/Os /prefix client cli_ /prefix server srv_ /prefix switch swi_ +midltests.h midltests_s.c midltests_c.c: midltests.idl midltests.acf + midl $(MIDL_ARGS) /acf midltests.acf midltests.idl + +MIDLTESTS_OBJ = midltests_simple.obj midltests_s_m.obj midltests_c_m.obj midltests_marshall.obj utils.obj +midltests_simple.exe: $(MIDLTESTS_OBJ) + $(CC) -o midltests_simple.exe $(MIDLTESTS_OBJ) $(LIBS) + +midltests_simple.obj: midltests.h midltests.idl +midltests_c_m.c: midltests_c.c +midltests_s_m.c: midltests_s.c + +midltests_simple.obj: midltests.h midltests.idl midltests_simple.c +midltests_s_m.obj: midltests_marshall.h midltests_s.c midltests_s_m.c +midltests_c_m.obj: midltests_marshall.h midltests_c.c midltests_c_m.c +midltests_marshall.obj: midltests.h midltests_marshall.c +utils.obj: midltests.h utils.c diff --git a/testprogs/win32/midltests/midltests.c b/testprogs/win32/midltests/midltests.c deleted file mode 100644 index 61d4ce0812..0000000000 --- a/testprogs/win32/midltests/midltests.c +++ /dev/null @@ -1,42 +0,0 @@ -/* - MIDLTESTS client. - - Copyright (C) Stefan Metzmacher 2008 - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . -*/ - -#include -#include -#include -#include "midltests.h" - -#define MIDLTESTS_C_CODE 1 -#include "midltests.idl" - -int main(int argc, char **argv) -{ - int ret; - - midltests_IfHandle = NULL; - - RpcTryExcept { - midltests(); - } RpcExcept(1) { - ret = RpcExceptionCode(); - printf("Runtime error 0x%x\n", ret); - } RpcEndExcept - - return ret; -} diff --git a/testprogs/win32/midltests/midltests_simple.c b/testprogs/win32/midltests/midltests_simple.c new file mode 100644 index 0000000000..61d4ce0812 --- /dev/null +++ b/testprogs/win32/midltests/midltests_simple.c @@ -0,0 +1,42 @@ +/* + MIDLTESTS client. + + Copyright (C) Stefan Metzmacher 2008 + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*/ + +#include +#include +#include +#include "midltests.h" + +#define MIDLTESTS_C_CODE 1 +#include "midltests.idl" + +int main(int argc, char **argv) +{ + int ret; + + midltests_IfHandle = NULL; + + RpcTryExcept { + midltests(); + } RpcExcept(1) { + ret = RpcExceptionCode(); + printf("Runtime error 0x%x\n", ret); + } RpcEndExcept + + return ret; +} -- cgit