File: prhello-Makefile

package info (click to toggle)
mit-scheme 12.1-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 208,300 kB
  • sloc: lisp: 781,881; xml: 425,435; ansic: 86,059; sh: 10,135; makefile: 2,501; asm: 2,121; csh: 1,143
file content (36 lines) | stat: -rw-r--r-- 1,022 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
AUXDIR=/usr/local/lib/mit-scheme-i386

install: build
	install -m 644 prhello-types.bin $(AUXDIR)
	install -m 644 prhello-const.bin $(AUXDIR)
	install -m 644 prhello-shim.so $(AUXDIR)

uninstall:
	rm $(AUXDIR)/prhello-*

clean:
	rm prhello-const* prhello-types* prhello-shim* 

build: prhello-shim.so prhello-types.bin prhello-const.bin

prhello-shim.so: prhello-shim.o
	$(CC) -shared -fPIC -o $@ $^ `pkg-config --libs gtk+-3.0`

prhello-shim.o: prhello-shim.c
	$(CC) -I$(AUXDIR) -Wall -fPIC `pkg-config --cflags gtk+-3.0` -o $@ -c $<

prhello-shim.c prhello-const.c prhello-types.bin: prhello.cdecl
	echo '(generate-shim "prhello" "#include <gtk/gtk.h>")' \
	| mit-scheme --batch-mode

prhello-const.bin: prhello-const.scm
	echo '(sf "prhello-const")' | mit-scheme --batch-mode

prhello-const.scm: prhello-const
	./prhello-const

prhello-const: prhello-const.o
	$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) `pkg-config --libs gtk+-3.0`

prhello-const.o: prhello-const.c
	$(CC) `pkg-config --cflags gtk+-3.0` $(CFLAGS) -o $@ -c $<