File: Makefile

package info (click to toggle)
libkarma 0.1.2-11
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 668 kB
  • sloc: ansic: 6,224; sh: 328; makefile: 220; cs: 170
file content (48 lines) | stat: -rw-r--r-- 1,119 bytes parent folder | download | duplicates (6)
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
ASSEMBLY_SOURCES=Song.cs Device.cs
ASSEMBLY_RESOURCES=
MCS=$(shell which gmcs)
MCS_FLAGS = -debug

ifeq ($(MCS),)
	HAS_MONO=
else
	HAS_MONO=true
endif

ifdef HAS_MONO
	ASSEMBLY=karma-sharp.dll
else
	ASSEMBLY=
	PRINT = Note: mcs not found, not building karma-sharp!
endif

all: $(ASSEMBLY)
	@echo $(PRINT)


karma-sharp.pc: FORCE
	sed -e 's,@prefix@,$(PREFIX),g; s,@VERSION@,$(VERSION),g' \
	karma-sharp.pc.in > karma-sharp.pc

ifdef HAS_MONO
install: $(ASSEMBLY) karma-sharp.pc $(ASSEMBLY).config
	../install-sh -d $(DESTDIR)$(PREFIX)/lib/karma-sharp
	../install-sh -d $(DESTDIR)$(PREFIX)/lib/pkgconfig
	../install-sh -t $(DESTDIR)$(PREFIX)/lib/karma-sharp $(ASSEMBLY) $(ASSEMBLY).config
	../install-sh -t $(DESTDIR)$(PREFIX)/lib/pkgconfig -m 0644 karma-sharp.pc
else
install:

endif

uninstall: FORCE
	$(RM) -r $(PREFIX)/lib/karma-sharp
	$(RM) $(PREFIX)/lib/pkgconfig/karma-sharp.pc

$(ASSEMBLY): $(ASSEMBLY_SOURCES) $(ASSEMBLY_RESOURCES)
	$(MCS) $(MCS_FLAGS) -unsafe -target:library -out:$@ $(ASSEMBLY_SOURCES) $(ASSEMBLY_RESOURCES:%=-resource:%) -r:Mono.Posix

clean: FORCE
	$(RM) *.dll *.mdb karma-sharp.pc

FORCE: