Update copyright to LGPL on all files
[dyninst.git] / dyninstAPI / tests / nmake.module.tmpl
1
2 # Common makefile template for dyninst Tests.  This file is not intended to
3 # be a useful Makefile in isolation; instead, it should be included
4 # from within an architecture-specific Makefile.
5 #
6 # $Id: nmake.module.tmpl,v 1.28 2006/05/25 22:27:50 jodom Exp $
7 #
8
9 SUITE_NAME      = Dyninst
10 RELEASE_NUM     = 4.2
11 #BUILD_MARK should be (re-)defined in core/make.config.local rather than here!
12
13 DEST            = $(TO_CORE)\$(PROGRAM_DEST)\testprogs
14
15 !ifdef TARGET
16 SRCS          = ../src/$(TARGET:.exe=.C) ../src/test_util.C
17 OBJS          = $(TARGET:.exe=.obj) test_util.obj
18 !else
19 TARGETS       = test1.exe test2.exe test3.exe test4.exe test5.exe test6.exe test8.exe
20 !ifdef NATIVE_CC
21 TARGETS       = $(TARGETS) \
22                 test1.mutatee_$(NATIVE_CC).exe \
23                 test2.mutatee_$(NATIVE_CC).exe \
24                 test3.mutatee_$(NATIVE_CC).exe \
25                 test4a.mutatee_$(NATIVE_CC).exe \
26                 test4b.mutatee_$(NATIVE_CC).exe \
27                 test6.mutatee_$(NATIVE_CC).exe \
28                 test8.mutatee_$(NATIVE_CC).exe
29 !endif
30 !ifdef NATIVE_CXX
31 TARGETS       = $(TARGETS) \
32                 test1.mutatee_$(NATIVE_CXX).exe \
33                 test2.mutatee_$(NATIVE_CXX).exe \
34                 test3.mutatee_$(NATIVE_CXX).exe \
35                 test4a.mutatee_$(NATIVE_CXX).exe \
36                 test4b.mutatee_$(NATIVE_CXX).exe \
37                 test5.mutatee_$(NATIVE_CXX).exe \
38                 test8.mutatee_$(NATIVE_CXX).exe
39 !endif
40 !ifdef M_GCC
41 TARGETS       = $(TARGETS) \
42                 test1.mutatee_$(M_GCC).exe \
43                 test2.mutatee_$(M_GCC).exe \
44                 test3.mutatee_$(M_GCC).exe \
45                 test4a.mutatee_$(M_GCC).exe \
46                 test4b.mutatee_$(M_GCC).exe \
47                 test8.mutatee_$(M_GCC).exe
48 !endif
49 !ifdef M_GXX
50 TARGETS       = $(TARGETS) \
51                 test1.mutatee_$(M_GXX).exe \
52                 test2.mutatee_$(M_GXX).exe \
53                 test3.mutatee_$(M_GXX).exe \
54                 test4a.mutatee_$(M_GXX).exe \
55                 test4b.mutatee_$(M_GXX).exe \
56                 test5.mutatee_$(M_GXX).exe \
57                 test8.mutatee_$(M_GXX).exe
58 !endif
59 SRCS          = ../src/test1.C ../src/test1.mutatee.c ../src/test_util.C \
60                 ../src/test2.C ../src/test2.mutatee.c \
61                 ../src/test3.C ../src/test3.mutatee.c \
62                 ../src/test4.C ../src/test4a.mutatee.c \
63                 ../src/test4b.mutatee.c \
64                 ../src/test5.C ../src/test5.mutatee.C \
65                 ../src/test6.C \
66                 ../src/test8.C ../src/test8.mutatee.c
67 OBJS          = test1.obj test2.obj test3.obj test4.obj test5.obj test6.obj test_util.obj
68 !endif
69
70 CXXFLAGS     = $(CXXFLAGS) -I../../h
71 CFLAGS       = $(CFLAGS) -I../../h
72
73 LIBS            = $(TO_CORE)\$(LIBRARY_DEST)\libdyninstAPI.lib
74
75 SYSLIBS         = 
76
77 all:
78         $(MAKE) aTest TARGET=test1.exe MUTATEE_SRC="../src/test1.mutateeCommon.c ../src/mutatee_util.c"
79         $(MAKE) aTest TARGET=test2.exe 
80         $(MAKE) aTest TARGET=test3.exe
81         $(MAKE) aTest TARGET=test4.exe
82         $(MAKE) aTest TARGET=test5.exe
83         $(MAKE) aTest TARGET=test6.exe
84         $(MAKE) aTest TARGET=test8.exe MUTATEE_SRC=../src/mutatee_util.c
85 !ifdef NATIVE_CC
86         $(MAKE) aTest MUTATEE_CC=$(NATIVE_CC) TARGET2=test1.mutatee_$(NATIVE_CC).exe MUTATEE_SRC="../src/test1.mutateeCommon.c ../src/mutatee_util.c"
87         $(MAKE) aTest MUTATEE_CC=$(NATIVE_CC) TARGET2=test2.mutatee_$(NATIVE_CC).exe
88         $(MAKE) aTest MUTATEE_CC=$(NATIVE_CC) TARGET2=test3.mutatee_$(NATIVE_CC).exe
89         $(MAKE) aTest MUTATEE_CC=$(NATIVE_CC) TARGET2=test4a.mutatee_$(NATIVE_CC).exe
90         $(MAKE) aTest MUTATEE_CC=$(NATIVE_CC) TARGET2=test4b.mutatee_$(NATIVE_CC).exe
91         $(MAKE) aTest MUTATEE_CC=$(NATIVE_CC) TARGET2=test6.mutatee_$(NATIVE_CC).exe MUTATEE_ASM=test6LS-masm.asm
92         $(MAKE) aTest MUTATEE_CC=$(NATIVE_CC) TARGET2=test8.mutatee_$(NATIVE_CC).exe MUTATEE_SRC=../src/mutatee_util.c
93 !endif
94 !ifdef NATIVE_CXX
95         $(MAKE) aTest MUTATEE_CC=$(NATIVE_CXX) TARGET2=test1.mutatee_$(NATIVE_CXX).exe MUTATEE_SRC="../src/test1.mutateeCommon.c ../src/mutatee_util.c"
96         $(MAKE) aTest MUTATEE_CC=$(NATIVE_CXX) TARGET2=test2.mutatee_$(NATIVE_CXX).exe
97         $(MAKE) aTest MUTATEE_CC=$(NATIVE_CXX) TARGET2=test3.mutatee_$(NATIVE_CXX).exe
98         $(MAKE) aTest MUTATEE_CC=$(NATIVE_CXX) TARGET2=test4a.mutatee_$(NATIVE_CXX).exe
99         $(MAKE) aTest MUTATEE_CC=$(NATIVE_CXX) TARGET2=test4b.mutatee_$(NATIVE_CXX).exe
100         $(MAKE) aTest MUTATEE_CC=$(NATIVE_CXX) TARGET2=test5.mutatee_$(NATIVE_CXX).exe MUTATEE_SUFFIX=.C
101         $(MAKE) aTest MUTATEE_CC=$(NATIVE_CXX) TARGET2=test8.mutatee_$(NATIVE_CXX).exe MUTATEE_SRC=../src/mutatee_util.c
102 !endif
103 !ifdef M_GCC
104         $(MAKE) aTest MUTATEE_CC=$(M_GCC) TARGET2=test1.mutatee_$(M_GCC).exe MUTATEE_SRC="../src/test1.mutateeCommon.c ../src/mutatee_util.c"
105         $(MAKE) aTest MUTATEE_CC=$(M_GCC) TARGET2=test2.mutatee_$(M_GCC).exe 
106         $(MAKE) aTest MUTATEE_CC=$(M_GCC) TARGET2=test3.mutatee_$(M_GCC).exe
107         $(MAKE) aTest MUTATEE_CC=$(M_GCC) TARGET2=test4a.mutatee_$(M_GCC).exe
108         $(MAKE) aTest MUTATEE_CC=$(M_GCC) TARGET2=test4b.mutatee_$(M_GCC).exe
109         $(MAKE) aTest MUTATEE_CC=$(M_GCC) TARGET2=test8.mutatee_$(M_GCC).exe MUTATEE_SRC=../src/mutatee_util.c
110 !endif
111 !ifdef M_GXX
112         $(MAKE) aTest MUTATEE_CC=$(M_GXX) TARGET2=test1.mutatee_$(M_GXX).exe MUTATEE_SRC="../src/test1.mutateeCommon.c ../src/mutatee_util.c"
113         $(MAKE) aTest MUTATEE_CC=$(M_GXX) TARGET2=test2.mutatee_$(M_GXX).exe
114         $(MAKE) aTest MUTATEE_CC=$(M_GXX) TARGET2=test3.mutatee_$(M_GXX).exe
115         $(MAKE) aTest MUTATEE_CC=$(M_GXX) TARGET2=test4a.mutatee_$(M_GXX).exe
116         $(MAKE) aTest MUTATEE_CC=$(M_GXX) TARGET2=test4b.mutatee_$(M_GXX).exe
117         $(MAKE) aTest MUTATEE_CC=$(M_GXX) TARGET2=test5.mutatee_$(M_GXX).exe MUTATEE_SUFFIX=.C
118         $(MAKE) aTest MUTATEE_CC=$(M_GXX) TARGET2=test8.mutatee_$(M_GXX).exe MUTATEE_SRC=../src/mutatee_util.c
119 !endif
120
121 aTest: $(TARGET) $(TARGET2)
122
123 UNCOMMON_INSTALL=true
124
125 install: all
126         -$(MKDIR) $(DEST)
127         for %X IN ( $(TARGETS) ) DO $(CP) "%X" $(DEST)
128