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.
6 # $Id: nmake.module.tmpl,v 1.16 2005/02/10 20:39:15 jaw Exp $
11 #BUILD_MARK should be (re-)defined in core/make.config.local rather than here!
14 TEST_TARGET = testDyner.exe
16 SRCS = ../src/$(TARGET:.exe=.C) lex.$(TARGET:.exe=.c) $(TARGET:.exe=.tab).c
17 TEST_SRC = ../tests/$(TEST_TARGET:.exe=.C)
19 OBJS = $(TARGET:.exe=.obj) lex.$(TARGET:.exe=.obj) $(TARGET:.exe=.tab).obj
21 IFLAGS = $(IFLAGS) -I$(TO_CORE)/dyninstAPI/h -I../src
23 LIBS = $(TO_CORE)/$(LIBRARY_DEST)/libdyninstAPI.lib
25 SYSLIBS = -LIBPATH:$(TCLTK_DIR)\lib $(TCL_LIB) ws2_32.lib
27 all: $(TARGET) $(TEST_TARGET)
29 $(TEST_TARGET:.exe=.obj): $(TEST_SRC)
30 $(CC) $(CXXFLAGS) -c -o $(TEST_TARGET:.exe=.obj) $(TEST_SRC)
32 $(TEST_TARGET): $(TEST_TARGET:.exe=.obj)
33 $(LINK) -out:$(TEST_TARGET) $(LDFLAGS) -debug -pdb:none \
34 $(TEST_TARGET:.exe=.obj)
36 LFLAGS = $(LFLAGS) -P$(TARGET:.exe=)
37 YFLAGS = $(YFLAGS) -p $(TARGET:.exe=)
39 lex.$(TARGET:.exe=.c): ../src/cmdline.l $(TARGET:.exe=.tab).h
40 $(LEX) $(LFLAGS) ../src/cmdline.l
41 $(PERL) $(TO_CORE)\..\scripts\vcStripUnistd.pl < $@ > $@.tmp
45 $(TARGET:.exe=.tab).c $(TARGET:.exe=.tab).h: ../src/cmdline.y
46 $(YACC) $(YFLAGS) ../src/cmdline.y
47 $(PERL) $(TO_CORE)\..\scripts\vcStripStd.pl < y.tab.c > $(TARGET:.exe=.tab).c
48 $(MV) y.tab.h $(TARGET:.exe=.tab).h