File: Makefile

package info (click to toggle)
libkarma 0.1.2-6
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid
  • size: 676 kB
  • sloc: ansic: 6,224; sh: 328; makefile: 229; cs: 170
file content (81 lines) | stat: -rw-r--r-- 1,905 bytes parent folder | download | duplicates (4)
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
LK_SRC=src
TOOLSDIR=tools
PREFIX=/usr
INSTALL?=./install-sh
VERSION=0.1.2
SHELL=/bin/bash

export PREFIX
export VERSION

DISTNAME=libkarma-$(VERSION)
DISTFILES= $(LK_SRC)/{Jamfile,Makefile,*[ch]} \
	$(TOOLSDIR)/{Jamfile,Makefile,*[ch]} \
	karma-sharp/{Makefile,karma-sharp.pc.in,Song.cs,Device.cs} \
	Jamfile Makefile COPYING ChangeLog THANKS INSTALL* TODO \
	install-sh karma-tools.spec
DOCS=THANKS TODO ChangeLog

INSTALL_DIR     := $(INSTALL) -d -o root -g root -m 0755
INSTALL_FILE    := $(INSTALL)    -o root -g root -m 0644
INSTALL_PROGRAM := $(INSTALL)    -o root -g root -m 0755
INSTALL_SCRIPT  := $(INSTALL)    -o root -g root -m 0755

all: libkarma tools karma-sharp

static: libkarma toolsStatic karma-sharp

install: libkarma tools karma-sharp
	cd $(LK_SRC) && $(MAKE) install
	cd karma-sharp && $(MAKE) install
	cd tools && $(MAKE) install
	$(INSTALL_DIR) $(DESTDIR)/$(PREFIX)/share/doc/libkarma
	$(INSTALL_FILE) $(DOCS) $(DESTDIR)/$(PREFIX)/share/doc/libkarma

uninstall: 
	cd $(LK_SRC) && $(MAKE) uninstall
	cd karma-sharp && $(MAKE) uninstall
	cd tools && $(MAKE) uninstall
	rm -rf $(DESTDIR)/$(PREFIX)/share/doc/libkarma

libkarma: FORCE
	cd $(LK_SRC) && $(MAKE)

tools: FORCE
	cd $(TOOLSDIR) && $(MAKE)

toolsStatic: FORCE
	cd $(TOOLSDIR) && $(MAKE) static

karma-sharp: FORCE
	cd karma-sharp && $(MAKE)

dist: 
	mkdir -p $(DISTNAME)
	mkdir -p $(DISTNAME)/$(LK_SRC)
	mkdir -p $(DISTNAME)/$(TOOLSDIR)
	mkdir -p $(DISTNAME)/karma-sharp
	cp --parents $(DISTFILES) $(DISTNAME)
	tar czvf $(DISTNAME).tar.gz $(DISTNAME)
	$(RM) -r $(DISTNAME)

distcheck: dist
	mkdir build
	cd build && tar xzvf ../$(DISTNAME).tar.gz && \
	cd $(DISTNAME) && $(MAKE)
	$(RM) -r build

.PHONY: clean

clean-libkarma:
	( cd $(LK_SRC)    ; make clean )

clean-tools:
	( cd $(TOOLSDIR)  ; make clean )

clean-karma-sharp:
	( cd karma-sharp  ; make clean )

clean: clean-tools clean-libkarma clean-karma-sharp

FORCE: