3 ## Copyright (c) 1999-2004, International Business Machines Corporation and
4 ## others. All Rights Reserved.
6 ## Flags for position independent code
7 SHAREDLIBCFLAGS = -KPIC
8 SHAREDLIBCXXFLAGS = -KPIC
9 SHAREDLIBCPPFLAGS = -DPIC
11 ## Commands to generate dependency files
12 GEN_DEPS.c= $(CC) -Kthread -DPTX -c $(DEFS) $(CPPFLAGS)
13 GEN_DEPS.cc= $(CXX) -M -DPTX $(DEFS) $(CPPFLAGS)
15 ## Commands to compile
16 COMPILE.c= $(CC) -Kthread -DPTX $(DEFS) $(CPPFLAGS) $(CFLAGS) -c
17 COMPILE.cc= $(CXX) -Kthread -DPTX $(DEFS) $(CPPFLAGS) $(CXXFLAGS) -c
20 #LINK.c= $(CC) $(DEFS) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS)
21 LINK.c= $(CXX) $(DEFS) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -lm -lgen
22 LINK.cc= $(CXX) $(DEFS) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -lm -lgen
24 ## Commands to make a shared library
25 SHLIB.c= $(CC) $(DEFS) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -DPTX -G
26 SHLIB.cc= $(CXX) $(DEFS) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -DPTX -G
28 ## Compiler switch to embed a runtime search path
32 ## Versioned target for a shared library.
33 FINAL_SO_TARGET = $(SO_TARGET)
36 ## Shared object suffix
38 ## Non-shared intermediate object suffix
42 %.$(STATIC_O): $(srcdir)/%.c
43 $(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) -o $@ $<
45 $(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -o $@ $<
47 %.$(STATIC_O): $(srcdir)/%.cpp
48 $(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS) -o $@ $<
50 $(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS) -o $@ $<
54 @echo "generating dependency information for $<"
55 @$(SHELL) -ec '$(GEN_DEPS.c) $< \
56 | sed '\''s/\($*\)\.o[ :]*/\1.o $@ : /g'\'' > $@; \
57 [ -s $@ ] || rm -f $@'
60 @echo "generating dependency information for $<"
61 @$(SHELL) -ec '$(GEN_DEPS.cc) -o $@ $< \
62 | sed '\''s/\($*\)\.o[ :]*/\1.o $@ : /g'\'' > $@; \
63 [ -s $@ ] || rm -f $@'
65 ## End Ptx-specific setup