File: Makefile.common

package info (click to toggle)
trayer 1.1.8-4.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 296 kB
  • sloc: ansic: 2,384; makefile: 40; sh: 21
file content (37 lines) | stat: -rw-r--r-- 718 bytes parent folder | download | duplicates (3)
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
ifeq (,$(TOPDIR))
$(error TOPDIR variable must be defined)
endif

all:

$(TOPDIR)/Makefile.config:
	$(error Please run $(TOPDIR)/configure first)

ifneq ($(MAKECMDGOALS),clean)
ifneq ($(MAKECMDGOALS),distclean)
ifneq ($(MAKECMDGOALS),tar)
-include $(TOPDIR)/Makefile.config
endif
endif
endif

CC ?= gcc
PKG_CONFIG ?= pkg-config

LIBS = $(shell $(PKG_CONFIG) --libs gtk+-2.0 gdk-pixbuf-2.0 x11)
INCS = $(shell $(PKG_CONFIG) --cflags gtk+-2.0 gdk-pixbuf-2.0 x11)
CFLAGS ?= -O2 -Wall
ifneq (,$(DEVEL))
CFLAGS ?= -g -Wall 
endif

%.o: %.c
	$(CC) $(CPPFLAGS) $(CFLAGS) $(INCS) -c $<

%.dep: %.c
	$(CC) $(CPPFLAGS) $(CFLAGS) $(INCS) -MM $< -o $@

.PHONY: all clean distclean install uninstall

distclean: clean
install: all