Makefile.am 1.74 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
10
libCLHEP_RefCount_@VERSION@_a_SOURCES = \
	ZMuseCount.cc
11

Lynn Garren's avatar
Lynn Garren committed
12
libCLHEP_RefCount_@VERSION@_so_OBJECTS = $(patsubst %.cc,$(shareddir)/%.$(OBJEXT),$(libCLHEP_RefCount_@VERSION@_a_SOURCES))
13

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

CLEANFILES =  $(lib_shared)

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

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

Lynn Garren's avatar
Lynn Garren committed
38
39
if BUILD_VISUAL
$(lib_shared): $(libCLHEP_RefCount_@VERSION@_so_OBJECTS)
40
	$(SHLINK) $(SHNAME)$@ $(libCLHEP_RefCount_@VERSION@_so_OBJECTS) $(LDADD)
Lynn Garren's avatar
Lynn Garren committed
41
42
43
44

$(shareddir)/%.$(OBJEXT): %.cc
	$(CXXCOMPILE) $(SHFLAGS) /c /Fo$@ $<
else
Lynn Garren's avatar
Lynn Garren committed
45
$(lib_shared): $(libCLHEP_RefCount_@VERSION@_so_OBJECTS)
Lynn Garren's avatar
Lynn Garren committed
46
	$(CXXLINK) $(SHLINK) $(SHNAME)$@ $(libCLHEP_RefCount_@VERSION@_so_OBJECTS) $(LDADD)
Lynn Garren's avatar
Lynn Garren committed
47
48
49

$(shareddir)/%.$(OBJEXT): %.cc
	$(CXXCOMPILE) $(SHFLAGS) -c -o $@ $<
Lynn Garren's avatar
Lynn Garren committed
50
endif
Lynn Garren's avatar
Lynn Garren committed
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66

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)