Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/main/Makefile
blob: 876b07ae4cab3073d623d506d46269ded3220ab8 (plain)
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
#!/usr/bin/make -rf

# Disable pre-existing implicit rules and suffix rules for easier dep debugging.
%.o : %.s
% : RCS/%,v
% : RCS/%
% : %,v
% : s.%
% : SCCS/s.%
.SUFFIXES:
SUFFIXES :=

# Get configuration data.
config.mk: configure
	./configure

include config.mk

%.o: %.c
	$(CC) $(ALLCFLAGS) -c -o $@ $<

#test_format_buf: $(TEST_FORMAT_BUF_OBJS)
#	$(CC) -g $(LDFLAGS) -o $@ $^
#
#libnss_dnshash.so.2: $(DNSHASH_OBJS)
#	$(CC) -g -shared $(LDFLAGS) -o $@ -Wl,-soname,$@ $^ -lssl

BINARIES = $(wildcard bin/*)
DATA = data/sugar-72.gtkrc data/sugar-100.gtkrc
CLEAN =

PYTHON_DIRS=$(shell cd src; find * -type d)
PYTHON_FILES=$(shell cd src; find * -name '*.py' -o -name '*.png')

all: $(BINARIES) $(DATA)

install: all
	for d in $(BINDIR) $(DATADIR) $(addprefix $(PYTHON_SITEPACKAGES)/,$(PYTHON_DIRS)); do \
		install -d $$d; \
	done
	for f in $(BINARIES); do \
		install -m0755 $$f $(BINDIR); \
	done
	for f in $(DATA); do \
		install -m0644 $$f $(DATADIR); \
	done
	for f in $(PYTHON_FILES); do \
		install -m0644 src/$$f $(PYTHON_SITEPACKAGES)/$$(dirname $$f); \
	done

clean:
	rm -rf $(CLEAN);

distclean: clean
	rm -f config.mk

# .PHONY:

-include $(ALL_OBJS:%.o=%.d)