Makefile.am 1.62 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_Cast_@VERSION@_a_SOURCES = \
	itos.cc
11

Lynn Garren's avatar
Lynn Garren committed
12
libCLHEP_Cast_@VERSION@_so_OBJECTS = $(patsubst %.cc,$(shareddir)/%.$(OBJEXT),$(libCLHEP_Cast_@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-Cast-@VERSION@.$(SHEXT)
else
Lynn Garren's avatar
Lynn Garren committed
20
  lib_shared = libCLHEP-Cast-@VERSION@.$(SHEXT)
Lynn Garren's avatar
Lynn Garren committed
21
endif
Lynn Garren's avatar
Lynn Garren committed
22
  SHFLAGS = @MY_SHFLAGS@
Lynn Garren's avatar
1.9.4.3    
Lynn Garren committed
23
  SHLINK = @MY_SHLINK@ @MY_SHEXTRA@
Lynn Garren's avatar
Lynn Garren committed
24
25
26
27
28
29
30
31
32
33
34
35
36
  SHNAME = @MY_SHNAME@
endif
if BUILD_STATIC
  lib_LIBRARIES = libCLHEP-Cast-@VERSION@.a
endif

CLEANFILES =  $(lib_shared)

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

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

37
38
39
40
41
42
43
if BUILD_VISUAL
$(lib_shared): $(libCLHEP_Cast_@VERSION@_so_OBJECTS)
	$(SHLINK) $(SHNAME)$@ $(libCLHEP_Cast_@VERSION@_so_OBJECTS)

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

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

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)