Makefile.common 718 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
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

18
CC ?= gcc
19 20 21 22
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)
23
CFLAGS ?= -O2 -Wall
24
ifneq (,$(DEVEL))
25
CFLAGS ?= -g -Wall 
26 27 28
endif

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

%.dep: %.c
32
	$(CC) $(CPPFLAGS) $(CFLAGS) $(INCS) -MM $< -o $@
33 34 35 36 37

.PHONY: all clean distclean install uninstall

distclean: clean
install: all