~ubuntu-branches/ubuntu/trusty/libspnav/trusty

« back to all changes in this revision

Viewing changes to Makefile.in

  • Committer: Bazaar Package Importer
  • Author(s): M G Berberich
  • Date: 2010-05-25 21:20:21 UTC
  • mto: (1.1.2 upstream)
  • mto: This revision was merged to the branch mainline in revision 6.
  • Revision ID: james.westby@ubuntu.com-20100525212021-g2sk0ukjkyr4ebkt
ImportĀ upstreamĀ versionĀ 0.2.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
obj = spnav.o $(magellan_obj)
 
3
hdr = spnav.h spnav_magellan.h spnav_config.h
 
4
lib_a = libspnav.a
 
5
soname = libspnav.so.0
 
6
lib_so = $(soname).1
 
7
 
 
8
CC = gcc
 
9
AR = ar
 
10
CFLAGS = $(opt) $(dbg) -std=c89 -fpic -pedantic -Wall -fno-strict-aliasing -I.
 
11
 
 
12
.PHONY: all
 
13
all: $(lib_a) $(lib_so)
 
14
 
 
15
$(lib_a): $(obj)
 
16
        $(AR) rcs $@ $(obj)
 
17
 
 
18
$(lib_so): $(obj)
 
19
        $(CC) -shared -Wl,-soname,$(soname) -o $@ $(obj)
 
20
 
 
21
%.o: $(srcdir)/%.c
 
22
        $(CC) $(CFLAGS) -c $< -o $@
 
23
 
 
24
.PHONY: clean
 
25
clean:
 
26
        rm -f $(obj)
 
27
 
 
28
.PHONY: cleandist
 
29
distclean:
 
30
        rm -f $(obj) $(lib_a) $(lib_so) Makefile
 
31
 
 
32
.PHONY: install
 
33
install: $(lib_a) $(lib_so)
 
34
        cp $(lib_a) $(PREFIX)/$(libdir)/$(lib_a)
 
35
        cp $(lib_so) $(PREFIX)/$(libdir)/$(lib_so)
 
36
        for h in $(hdr); do cp -p $(srcdir)/$$h $(PREFIX)/include/; done
 
37
 
 
38
.PHONY: uninstall
 
39
uninstall:
 
40
        rm -f $(PREFIX)/$(libdir)/$(lib_a)
 
41
        rm -f $(PREFIX)/$(libdir)/$(lib_so)
 
42
        for i in $(hdr); do rm -f $(PREFIX)/include/$$i; done
 
43