small fixes for my last commit (async events)
[dyninst.git] / dyninstAPI / tests / alpha-dec-osf5.1 / Makefile
1 # $Id: Makefile,v 1.7 2005/02/10 20:39:16 jaw Exp $
2 #
3 # Makefile for dyninstAPI test programs on Tru64 Alpha
4 #
5
6 # Define any symbols needed to invoke configuration changes in make.config
7 TO_CORE =       ../../..
8 NO_IMPLICIT_TEMPLATES=true
9 NO_OPT_FLAG=true
10
11 # Include standard make configuration stuff that applies to everything
12 # in the paradyn tree.
13
14 include $(TO_CORE)/make.config 
15
16 # Now make any necessary architecture specific changes to variables:
17
18 CFLAGS += -g
19 CFLAGS += -pthread
20 CXXFLAGS += -pthread
21 MUTATEE_FFLAGS += -Dalpha_dec_osf4_0 -g
22 LDFLAGS += -lrt
23
24 NATIVE_CC = cc
25 NATIVE_CXX = cxx
26 M_GXX = g++
27 M_GCC = gcc
28 NATIVE_FC = f90
29 COMMA=,
30
31 MINI_PLATFORM = alpha
32 TEST6_ASFLAGS = -cpp
33 TEST6_ASSUFFIX = s
34
35 ifeq ($(NATIVE_FC), $(MUTATEE_FC))
36
37 COMPILER = f90
38 # FORTRAN_BASE = test1.mutateeFort, etc.
39 FORTRAN_BASE = $(TARGET2:_$(NATIVE_FC)=Fort)
40 FORTRAN_BASE = test1.mutateeFort
41
42 $(TARGET2): $(FORTRAN_BASE)_$(NATIVE_FC).o $(FORTRAN_BASE)C_$(NATIVE_FC).o test1.mutateeCommon.o mutatee_util.o
43         -$(MUTATEE_CC) -c ../src/mutatee_util.c
44         -$(NATIVE_FC) -g -nofor_main $(FORTRAN_BASE)_$(NATIVE_FC).o $(FORTRAN_BASE)C_$(NATIVE_FC).o test1.mutateeCommon.o mutatee_util.o $(MUTATEE_FLINKFLAGS) -o $(TARGET2)
45
46 $(FORTRAN_BASE)_$(NATIVE_FC).o: ../src/$(FORTRAN_BASE).F
47         -$(NATIVE_FC) $(MUTATEE_FFLAGS) -c -o $(FORTRAN_BASE)_$(NATIVE_FC).o ../src/$(FORTRAN_BASE).F
48
49 $(FORTRAN_BASE)C_$(NATIVE_FC).o: ../src/$(TARGET2:_$(NATIVE_FC)=).c
50         -$(MUTATEE_CC) $(filter-out -Wl$(COMMA)-bgcbypass:3, $(MUTATEE_CFLAGS)) -fno-implicit-templates -W -Wall $(FORT_SQGL_FLAG) -DFortran -c -o $(FORTRAN_BASE)C_$(NATIVE_FC).o ../src/$(FORTRAN_BASE)C.c
51 else
52 $(TARGET2): $(MUTATEE_SRC) $(MUTATEE_OBJS)
53         -$(MUTATEE_CC) -g $(MUTATEE_CFLAGS) \
54         $(MUTATEE_SRC) $(MUTATEE_OBJS) -o $(TARGET2)
55 endif
56
57 # Include the module-specific Makefile, which defines everything about
58 # the module that is common across architectures.
59
60 include ../make.module.tmpl
61
62 COMPILERT = $(shell $(MUTATEE_CC) -v 2>&1 | grep version | head -1)
63
64 MUTATEE_CFLAGS = $(MODCFLAGS) -g
65 ifeq ($(MUTATEE_CC),$(NATIVE_CC))
66 COMPILERT = $(shell $(MUTATEE_CC) -V 2>&1 | head -1)
67 MUTATEE_CFLAGS = $(UNIFIED_DEF) -g
68 endif
69 ifeq ($(MUTATEE_CC),$(NATIVE_CXX))
70 COMPILERT = $(shell $(MUTATEE_CC) -V 2>&1 | head -1)
71 MUTATEE_CFLAGS = -x cxx $(UNIFIED_DEF) -g -D__USE_STD_IOSTREAM
72 endif
73
74 EMPTY:=
75 BLANK:=$(EMPTY) $(EMPTY)
76 COMPILER = $(subst $(BLANK),_,$(COMPILERT))
77 MUTATEE_CFLAGS += -DCOMPILER='"$(COMPILER)"'
78
79 #$(TARGET2): $(MUTATEE_SRC) $(MUTATEE_OBJS)
80 #       -$(MUTATEE_CC) $(MUTATEE_CFLAGS) $(MUTATEE_SRC) $(MUTATEE_OBJS) -o $(TARGET2) $(MUTLIBS)
81
82 libtestA.o:
83         $(CC) -g -fpic -c ../src/libtestA.c
84
85 libtestB.o:
86         $(CC) -fpic -c ../src/libtestB.c
87
88 libtestA.so: libtestA.o
89         $(CC) -g -shared -o libtestA.so libtestA.o
90
91 libtestB.so: libtestB.o
92         $(CC) -shared -o libtestB.so libtestB.o
93
94 # Include the "standard program template".  This defines all the
95 # common targets like "clean", "install", etc.
96
97 include $(TO_CORE)/make.program.tmpl