3 ## Copyright (c) 1999-2000, International Business Machines Corporation and
4 ## others. All Rights Reserved.
6 ## $Id: mh-ptx,v 1.1.1.1 2003/02/05 21:31:17 avery Exp $
8 ## Flags for position independent code
9 SHAREDLIBCFLAGS = -KPIC
10 SHAREDLIBCXXFLAGS = -KPIC
11 SHAREDLIBCPPFLAGS = -DPIC
13 ## Commands to generate dependency files
14 GEN_DEPS.c= $(CC) -Kthread -DPTX -c $(DEFS) $(CPPFLAGS)
15 GEN_DEPS.cc= $(CXX) -M -DPTX $(DEFS) $(CPPFLAGS)
17 ## Commands to compile
18 COMPILE.c= $(CC) -Kthread -DPTX $(DEFS) $(CPPFLAGS) $(CFLAGS) -c
19 COMPILE.cc= $(CXX) -Kthread -DPTX $(DEFS) $(CPPFLAGS) $(CXXFLAGS) -c
22 #LINK.c= $(CC) $(DEFS) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS)
23 LINK.c= $(CXX) $(DEFS) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -lm -lgen
24 LINK.cc= $(CXX) $(DEFS) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -lm -lgen
26 ## Commands to make a shared library
27 SHLIB.c= $(CC) $(DEFS) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -DPTX -G
28 SHLIB.cc= $(CXX) $(DEFS) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -DPTX -G
30 ## Compiler switch to embed a runtime search path
34 ## Versioned target for a shared library.
35 FINAL_SO_TARGET = $(SO_TARGET)
38 ## Shared object suffix
40 ## Non-shared intermediate object suffix
44 %.$(STATIC_O): $(srcdir)/%.c
45 $(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) -o $@ $<
47 $(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -o $@ $<
49 %.$(STATIC_O): $(srcdir)/%.cpp
50 $(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS) -o $@ $<
52 $(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS) -o $@ $<
56 @echo "generating dependency information for $<"
57 @$(SHELL) -ec '$(GEN_DEPS.c) $< \
58 | sed '\''s/\($*\)\.o[ :]*/\1.o $@ : /g'\'' > $@; \
59 [ -s $@ ] || rm -f $@'
62 @echo "generating dependency information for $<"
63 @$(SHELL) -ec '$(GEN_DEPS.cc) -o $@ $< \
64 | sed '\''s/\($*\)\.o[ :]*/\1.o $@ : /g'\'' > $@; \
65 [ -s $@ ] || rm -f $@'
67 ## End Ptx-specific setup