File: Makefile

package info (click to toggle)
pigtk 1.1.3-3
  • links: PTS
  • area: main
  • in suites: potato
  • size: 1,248 kB
  • ctags: 104
  • sloc: ansic: 1,087; sh: 152; makefile: 121
file content (101 lines) | stat: -rw-r--r-- 2,754 bytes parent folder | download
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# Generated automatically from Makefile.in by configure.
# This line is needed on some machines.

VPATH=/mnt/disk2/home/hallon/paket/pigtk/pigtk-1.1.3
prefix=/usr
INSTALL=/usr/bin/install -c
SRCDIR=/mnt/disk2/home/hallon/paket/pigtk/pigtk-1.1.3
CC=gcc
PIKE=/usr/bin/pike
LIBS=-L/usr/lib -L/usr/X11R6/lib -lgtk -lgdk -rdynamic -lgmodule -lglib -ldl -lXi -lXext -lX11 -lm  /usr/lib/gcc-lib/i386-linux/2.95.2/libgcc.a
MODULE=GTK
LDFLAGS=-rdynamic 
LD=gcc -shared
CFLAGS=-I$(SRCDIR) -I/usr/include/pike -I. -Wimplicit-function-declaration -W -Wpointer-arith -Wno-unused    -O2 -pipe  -fPIC  -I/mnt/disk2/home/hallon/paket/pigtk/pigtk-1.1.3  -I/usr/X11R6/include -I/usr/lib/glib/include 
OBJS=""
DEST=/usr/lib/pike/modules
OS=`uname -srm|sed -e 's/ /-/g'|tr '[A-Z]' '[a-z]'|tr '/' '_'`
BUILDDIR=build/$(OS)

# FIXME: This should be automatic
DISTDIR=pigtk_1.1.3
# OBJS=$(shell cat files_to_compile)
# This is only possible with GNU make...
#.. so we use a trick instead. :-)

all: sources
	$(MAKE) "SOURCES=`cat sources`" all2

never_there:
	$(PIKE) $(SRCDIR)/build_pgtk.pike $(SRCDIR)

all2: never_there
	$(MAKE) "OBJS=`cat files_to_compile`" "SOURCES=`cat sources`" $(MODULE).so

debug: 
	$(MAKE) "CFLAGS=-g -DPGTK_DEBUG $(CFLAGS)" all

install: files_to_compile
	$(MAKE)  "OBJS=`cat files_to_compile`" "SOURCES=`cat sources`" real-install


sources: source
	$(PIKE) $(SRCDIR)/make_sources.pike $(SRCDIR)/source

clean:
	rm *.c *.o *.so files_to_compile prototypes.h

ChangeLog:
	(cd $(SRCDIR) && make_changelog > ChangeLog)

ChangeLog.gz:
	(cd $(SRCDIR) && make_changelog | gzip -9 > ChangeLog.gz)

configure: configure.in
	@echo Rebuilding the configure-script...; \
	echo; \
	aclocal && autoconf;

cvs_proper: CVS
	@echo Fixing CVS pointers...; \
	for f in `find $(DISTDIR) -type d -name CVS -print`; do \
	  if egrep 'anoncvs' "$$f/Root" 2>&1 >/dev/null; \
	  then \
	    echo "Altering $$f..."; \
	    echo ":pserver:anon@bloodberry.idonex.se:/cvs" >"$$f/Root"; \
	  else :; fi; \
	done;

dist_setup: ChangeLog
	@echo "Building distribution..."; \
	mkdir -p $(DISTDIR); \
	cd $(DISTDIR); \
	( cd $(SRCDIR) && tar cf - . ) | tar xf -; \
	rm -f config.[^h]*; \
	rm -f config.h; \
	rm -f *.tar.gz; \
	rm -f *.c; \
	rm -f Makefile;

dist: dist_setup cvs_proper
	@echo  Building tar file...; \
	tar cf - $(DISTDIR) | gzip -9 >$(DISTDIR).tar.gz;

$(MODULE).so: $(OBJS)
	$(LD) $(LDFLAGS) $(OBJS) -o $(MODULE).so $(LIBS)

real-install: $(MODULE).so
	cp -r $(SRCDIR)/$(MODULE)Support.pmod $(DEST);
	cp -r $(SRCDIR)/GDKSupport.pmod $(DEST);
	$(INSTALL) $(SRCDIR)/$(MODULE).pmod $(DEST);
	$(INSTALL) $(SRCDIR)/GDK.pmod $(DEST);
	$(INSTALL) $(MODULE).so $(DEST);

quick_docs:
	$(PIKE) $(SRCDIR)/build_pgtk.pike $(SRCDIR) docs

docs: install
	$(MAKE) quick_docs