Makefile.am 1.82 KB
Newer Older
1
2
## Process this file with automake to produce Makefile.in

Lynn Garren's avatar
Lynn Garren committed
3
4
5
6
if USE_GMAKE
  MAKE = gmake
endif

7
8
INCLUDES = -I$(top_builddir)

Lynn Garren's avatar
Lynn Garren committed
9
libCLHEP_Geometry_@VERSION@_a_SOURCES = \
10
11
12
13
14
15
	BasicVector3D.cc	\
	Normal3D.cc	\
	Plane3D.cc	\
	Point3D.cc	\
	Transform3D.cc	\
	Vector3D.cc
Lynn Garren's avatar
Lynn Garren committed
16
17
18
19
20
21

libCLHEP_Geometry_@VERSION@_so_OBJECTS = $(patsubst %.cc,$(shareddir)/%.$(OBJEXT),$(libCLHEP_Geometry_@VERSION@_a_SOURCES))

# these if/else blocks will be parsed by automake and translated
if BUILD_SHARED
  shareddir = shared
Lynn Garren's avatar
Lynn Garren committed
22
23
24
if BUILD_VISUAL
  lib_shared = CLHEP-Geometry-@VERSION@.$(SHEXT)
else
Lynn Garren's avatar
Lynn Garren committed
25
  lib_shared = libCLHEP-Geometry-@VERSION@.$(SHEXT)
26
  LDADD = -L${top_builddir}/../Vector/src -lCLHEP-Vector-@VERSION@
Lynn Garren's avatar
Lynn Garren committed
27
endif
Lynn Garren's avatar
Lynn Garren committed
28
  SHFLAGS = @MY_SHFLAGS@
29
  SHLINK = @MY_SHLINK@ @MY_SHEXTRA@
Lynn Garren's avatar
Lynn Garren committed
30
31
32
33
34
35
36
37
38
39
40
41
42
  SHNAME = @MY_SHNAME@
endif
if BUILD_STATIC
  lib_LIBRARIES = libCLHEP-Geometry-@VERSION@.a
endif

CLEANFILES =  $(lib_shared)

all-local: $(shareddir) $(lib_shared)

$(shareddir):
	test -d $(shareddir) || mkdir $(shareddir)

Lynn Garren's avatar
Lynn Garren committed
43
44
if BUILD_VISUAL
$(lib_shared): $(libCLHEP_Geometry_@VERSION@_so_OBJECTS)
45
	$(SHLINK) $(SHNAME)$@ $(libCLHEP_Geometry_@VERSION@_so_OBJECTS) $(LDADD)
Lynn Garren's avatar
Lynn Garren committed
46
47
48
49

$(shareddir)/%.$(OBJEXT): %.cc
	$(CXXCOMPILE) $(SHFLAGS) /c /Fo$@ $<
else
Lynn Garren's avatar
Lynn Garren committed
50
$(lib_shared): $(libCLHEP_Geometry_@VERSION@_so_OBJECTS)
Lynn Garren's avatar
Lynn Garren committed
51
	$(CXXLINK) $(SHLINK) $(SHNAME)$@ $(libCLHEP_Geometry_@VERSION@_so_OBJECTS) $(LDADD)
Lynn Garren's avatar
Lynn Garren committed
52
53
54

$(shareddir)/%.$(OBJEXT): %.cc
	$(CXXCOMPILE) $(SHFLAGS) -c -o $@ $<
Lynn Garren's avatar
Lynn Garren committed
55
endif
Lynn Garren's avatar
Lynn Garren committed
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71

install-exec-local: $(lib_shared)
	@$(NORMAL_INSTALL)
	test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)"
	@list='$(lib_shared)'; for p in $$list; do \
	  if test -f $$p; then \
	    echo " $(INSTALL) '$$p' '$(DESTDIR)$(libdir)/$$p'"; \
	    $(INSTALL) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
	  else :; fi; \
	done

clean-local:
	-test -d $(shareddir) && rm -f $(shareddir)/*.$(OBJEXT)

distclean-local:
	-test -d $(shareddir) && rm -rf ./$(shareddir)