changeset 278:c0cb589f6e05

minor modification to Makefile.mingw
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Sun, 14 Dec 2008 04:11:03 +0900
parents 9b6da8fa865a
children 071db91de7d8
files Makefile.mingw
diffstat 1 files changed, 24 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile.mingw	Sat Dec 13 18:57:00 2008 +0900
+++ b/Makefile.mingw	Sun Dec 14 04:11:03 2008 +0900
@@ -1,3 +1,16 @@
+# define this variable if you use gtk common directory.
+GTK_COMMON =
+
+ifneq ($(GTK_COMMON), )
+PIDGIN_TREE_TOP = $(GTK_COMMON)
+GLIB_TOP = $(GTK_COMMON)
+GTK_TOP = $(GTK_COMMON)
+ATK_TOP = $(GTK_COMMON)
+PANGO_TOP = $(GTK_COMMON)
+CAIRO_TOP = $(GTK_COMMON)
+ICONV_TOP = $(GTK_COMMON)
+GETTEXT_TOP = $(GTK_COMMON)
+else
 PIDGIN_TREE_TOP = ../pidgin-2.5.2
 GLIB_TOP = ../glib-dev-2.16.5
 GTK_TOP = ../gtk+-dev-2.12.11
@@ -6,6 +19,7 @@
 CAIRO_TOP = ../cairo-dev-1.6.4-2
 ICONV_TOP = ../win_iconv-tml-20080320
 GETTEXT_TOP = ../gettext-runtime-dev-0.17-1
+endif
 
 include $(PIDGIN_TREE_TOP)/libpurple/win32/global.mak
 
@@ -16,6 +30,7 @@
 SRCS = main.c util.c prefs.c icon.c twitter_api.c
 
 OBJS = $(SRCS:%.c=%.o) prefs_ui.o
+DEPEND = .deps
 
 CPPFLAGS = -I$(GLIB_TOP)/include/glib-2.0 \
 	-I$(GLIB_TOP)/lib/glib-2.0/include \
@@ -52,9 +67,6 @@
 
 all: $(TARGET)
 
-strip: $(TARGET)
-	$(STRIP) $^
-
 $(TARGET): $(OBJS)
 	$(CC) -shared $^ $(LDFLAGS) -o $@
 
@@ -64,5 +76,13 @@
 prefs_ui.o: prefs.ui
 	$(OBJCOPY) -I binary -O pe-i386 -B i386 $^ $@
 
+strip: $(TARGET)
+	$(STRIP) $^
+
 clean:
-	rm -f $(OBJS) $(TARGET) *~
+	rm -f $(OBJS) $(TARGET) $(DEPEND) *~
+
+$(DEPEND): $(SRCS)
+	$(CC) -MM $(SRCS) > $@
+
+-include $(DEPEND)