File: Makefile

package info (click to toggle)
fbpanel 4.12-1.1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 920 kB
  • ctags: 1,110
  • sloc: ansic: 9,017; sh: 549; makefile: 220
file content (81 lines) | stat: -rw-r--r-- 1,518 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
# Part 0
# load common stuff
TOPDIR = .
PLUGIN_CPU=ON
include $(TOPDIR)/Makefile.common

# Part 1
# recursive make
RGOALS := $(filter-out tar, $(MAKECMDGOALS))
#$(warning recursive goals $(RGOALS))

.PHONY: subdirs
all clean distclean install uninstall: subdirs

SUBDIRS = config man systray plugins
.PHONY: $(SUBDIRS)
subdirs: $(SUBDIRS)
$(SUBDIRS):
	$(Q)$(MAKE) -C $@ $(RGOALS)



SRC = panel.c misc.c plugin.c gtkbar.c bg.c gtkbgbox.c ev.c configurator.c 


ifeq (1,$(BUILD))
-include $(DEP)
endif

TARGET := fbpanel

EXTRAOBJ :=
ifeq (1,$(STATIC_PLUGINS))
override CFLAGS += -DSTATIC_PLUGINS
EXTRAOBJ = plugins/plugins.a systray/tray.a
endif

all: $(TARGET)
$(TARGET): $(OBJ)
	$(call summary,LD  ,$@)
	$(Q)$(CC) $(LDFLAGS) $(OBJ) $(EXTRAOBJ) $(LIBS) -o $@
ifeq (0,$(DEVEL))
	$(Q)strip $@
endif





distclean: 
	$(RM) Makefile.config config.h

install: 
	install -d $(PREFIX)/bin
	install -m 755 $(TARGET) $(PREFIX)/bin

uninstall:
	$(RM) $(PREFIX)/bin/$(TARGET)

.PHONY: tar

ifeq ($(filter tar, $(MAKECMDGOALS)),tar)
CWD=$(shell pwd)
VER=$(shell grep -e "\#define[[:space:]]\+VERSION[[:space:]]\+" version.h | \
	sed -e 's/^[^\"]\+\"//' -e 's/\".*$$//' )
endif

tar: 
	$(MAKE) distclean
	cd ..; \
	if [ -e fbpanel-$(VER) ]; then \
		echo fbpanel-$(VER) already exist; \
		echo "won't override";\
		exit 1;\
	else\
		ln -s $(CWD) fbpanel-$(VER);\
		tar --exclude .svn --exclude CVS --exclude .cvsignore \
			-hzcvf fbpanel-$(VER).tgz fbpanel-$(VER);\
		rm -f fbpanel-$(VER);\
	fi;
	@ls -al ../fbpanel-$(VER).tgz;