File: ivcommonrules

package info (click to toggle)
inventor 2.1.5-10-21
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 36,312 kB
  • sloc: ansic: 33,864; lisp: 7,361; cpp: 3,874; yacc: 369; sh: 359; perl: 234; awk: 141; makefile: 81; csh: 35; sed: 11
file content (137 lines) | stat: -rw-r--r-- 2,771 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
include $(COMMONRULES)



#
# Rule for generating C++ from shape source code in PP format.
#

.SUFFIXES: .pp

.pp.c++:
	$(IVPPP) < $< > $@

SHAPEFILES = $(PPFILES:.pp=.c++)

LDIRT += $(SHAPEFILES)



#
# Rules for building and installing Inventor and InventorXt DSO's.
#

$(LIBDSO): $(LARCHIVE)
	$(LD) $(LDDSOOPTS) $^ $(LDLIBS) $(POST_LDDSOOPTS) -o $@
ifneq ($(LIBNAME),)
	$(LN_S) $@ $(LIBNAME)
endif
ifneq ($(DSONAME),)
	$(LN_S) $@ $(DSONAME)
endif

$(LARCHIVE):
	for i in $(SUBDIRS); do $(MAKE) -C$$i all || exit 1; done
	$(RM) $(LARCHIVE)
	$(AR) $(ARFLAGS) $(LARCHIVE) $(OBJECTS)

install_ivlibdso: $(LIBDSO)
	mkdir -p $(IVLIBDIR)
	$(INSTALL) -m 755 $< $(IVLIBDIR)
ifneq ($(LIBNAME),)
	$(LN_S) $< $(IVLIBDIR)/$(LIBNAME)
endif
ifneq ($(DSONAME),)
	$(LN_S) $< $(IVLIBDIR)/$(DSONAME)
endif

	if [ "$(LIBTYPE)" = "debug" ]; then \
	  mkdir -p $(IVDLIBDIR); \
	  $(INSTALL) -m 755 $< $(IVDLIBDIR); \
	fi

install_ivheaders:
	mkdir -p $(IVHDRDIR)
	for h in $(HEADERS); do $(INSTALL) -m 644 $$h $(IVHDRDIR); done

LDIRT += $(LARCHIVE)



#
# Rules for creating and installing man pages from documentation in IVM format.
#

.SUFFIXES: .ivm .3iv

.ivm.3iv:
	(cd .. && $(IVMAN) `$(MAKEMANDIRS) $(*F)`) > $@

MAN3PAGES = $(IVMFILES:.ivm=.3iv)

all_man3iv: $(MAN3PAGES)

install_man3iv: $(MAN3PAGES)
	mkdir -p $(IVMAN3DIR)
	for i in $^; do $(INSTALL) -m 644 $$i $(IVMAN3DIR); done

install_man1: $(MAN1PAGES)
	mkdir -p $(IVMAN1DIR)
	for i in $^; do $(INSTALL) -m 644 $$i $(IVMAN1DIR); done

LDIRT += $(MAN3PAGES)



#
# Rules for building and installing programs, archives, and DSO's in apps
# directory.
#

$(PROGRAM): $(LTARGETS) $(OBJECTS)
	$(CXX) $(LDOPTS) $(OBJECTS) $(LDLIBS) -o $@

$(PROGRAMS_1): %: %.o
	$(CXX) $(LDOPTS) $< $(LDLIBS) -o $@

$(PROGRAMS_2): %: %.o $(OBJECTS)
	$(CXX) $(LDOPTS) $< $(OBJECTS) $(LDLIBS) -o $@

$(PROGRAMS_EXT):
	$(MAKE) -f GNUmakefile.$@

$(ARCHIVE): $(LTARGETS) $(OBJECTS)
	$(AR) $(ARFLAGS) $@ $(OBJECTS)

$(DSO): $(OBJECTS)
	$(LD) $(LDDSOOPTS) $(OBJECTS) $(LDLIBS) $(POST_LDDSOOPTS) -o $@

install_ivbin: $(PROGRAM)
	mkdir -p $(IVBINDIR)
	$(INSTALL) -m 755 $(PROGRAM) $(IVBINDIR)

install_ivscript:
	mkdir -p $(IVBINDIR)
	$(INSTALL) -m 755 $(SCRIPT) $(IVBINDIR)

install_ivdemo: $(DEMO)
	mkdir -p $(IVDEMOBINDIR) $(IVDEMODATADIR)
	$(INSTALL) -m 755 $(DEMO) $(IVDEMOBINDIR)
	if [ -e $(DEMO).RUNME ]; then \
	  $(INSTALL) -m 755 $(DEMO).RUNME $(IVDEMOBINDIR); \
	fi
	if [ -e $(DEMO).about ]; then \
	  $(INSTALL) -m 644 $(DEMO).about $(IVDEMOBINDIR); \
	fi



#
# Convenience assignments. TARGETS are removed by 'make clobber'.
#

all_ivbin: $(LIBDSO) $(PROGRAM) $(PROGRAMS_1) $(PROGRAMS_2) $(ARCHIVE) $(DSO) \
		$(BUNDLE)

TARGETS += $(LIBDSO) $(PROGRAM) $(PROGRAMS_1) $(PROGRAMS_2) $(PROGRAMS_EXT) \
		$(ARCHIVE) $(DSO) $(BUNDLE) $(LIBNAME)