Modification log added
[mediadatabase.git] / gtk / GNUmakefile
blob90c7a03ec80016887d4a961ff4ca5d9faf5ba315
1 ##############################################################################
3 # $Id: GNUmakefile,v 1.11 2005/02/19 21:03:03 nedko Exp $
5 # DESCRIPTION:
6 # Makefile for console mediadatabase frontends
8 # AUTHOR:
9 # Nedko Arnaudov <nedko@users.sourceforge.net>
11 # LICENSE:
12 # GNU GENERAL PUBLIC LICENSE version 2
14 ##############################################################################
16 PATHTOTOP=../
18 include $(PATHTOTOP)common.mk
20 GTK_ATLEAST_VERSION=2.6
21 GTK_OK := $(shell if pkg-config --atleast-version=$(GTK_ATLEAST_VERSION) gtk+-2.0 ;then echo yes ; else echo no ; fi)
23 ifeq ($(GTK_OK),yes)
24 CFLAGS += -g -Wall $(shell pkg-config --cflags gtk+-2.0 libglade-2.0)
25 LINKFLAGS += -g $(shell pkg-config --libs gtk+-2.0 libglade-2.0)
27 SOURCES = main.c medias.c media.c helper.c search.c path.c about.c glade.c preferences.c
29 OBJECTS = $(SOURCES:%.c=%.o)
30 DEP_FILES = $(OBJECTS:.o=.d)
32 default: build
34 build: mdb_gtk
36 %.o:%.c
37 $(ECHO) "Compiling $< to $@ ..."
38 $(CC) $(CFLAGS) $< -o $@
40 %.d:%.c
41 @echo "Creating dependency file $@ for $<"
42 $(GENDEP_C)
44 full_clean: clean
45 $(ECHO) "Removing dependency files ..."
46 $(RM_BEGIN) $(DEP_FILES) $(RM_END)
48 clean:
49 $(ECHO) "Cleaning ..."
50 $(RM_BEGIN) mdb_gtk $(RM_END)
51 $(RM_BEGIN) $(OBJECTS) $(RM_END)
53 rebuild: clean build
55 mdb_gtk: $(OBJECTS) ../libfrontend/libfrontend.a ../libdb/libdb.a
56 $(ECHO) "Linking $@"
57 $(LINK) $(LINKFLAGS) $(OBJECTS) ../libfrontend/libfrontend.a ../libdb/libdb.a -lmysqlclient -lcfl -lsqlite -o $@
59 # All object and dependency files depend on this file
60 $(OBJECTS) $(DEP_FILES): GNUmakefile
62 ifeq (,$(findstring clean,$(TARGET)))
63 -include $(DEP_FILES)
64 endif
66 else # GTK_OK
67 default:
68 @echo "Not building GTK frontend because cannot find good version of GTK+ (at least $(GTK_ATLEAST_VERSION))"
69 full_clean:
70 @echo "Not full-cleaning GTK frontend because cannot find good version of GTK+ (at least $(GTK_ATLEAST_VERSION))"
72 clean:
73 @echo "Not cleaning GTK frontend because cannot find good version of GTK+ (at least $(GTK_ATLEAST_VERSION))"
75 rebuild: clean build
76 endif # GTK_OK
78 ##############################################################################
80 # Modifications log:
82 # !!! WARNING !!! Following lines are automatically updated by the CVS system.
84 # $Log: GNUmakefile,v $
85 # Revision 1.11 2005/02/19 21:03:03 nedko
86 # Implement preferences window.
88 # Revision 1.10 2005/02/18 02:25:40 nedko
89 # We are now using libglade for menu - don't compile menu.c
91 # Revision 1.9 2005/02/18 02:14:56 nedko
92 # Compile new stuff.
94 # Revision 1.8 2004/11/21 14:08:45 nedko
95 # Fix GTK+ version success check
97 # Revision 1.7 2004/11/21 14:05:40 nedko
98 # Implement requried targets when GTK+ version does not match
100 # Revision 1.6 2004/11/21 14:02:54 nedko
101 # Check for GTK+ version
103 # Revision 1.5 2004/09/01 05:01:23 nedko
104 # Use common c/c++ flags
105 # Depend on internat libraries.
107 # Revision 1.4 2004/08/31 22:40:15 nedko
108 # Partitally implemented search feature.
110 # Revision 1.3 2004/06/20 12:24:21 nedko
111 # Use dependency files.
112 # Use common tool variables.
114 # Revision 1.2 2004/05/21 23:43:38 nedko
115 # Implement media window.
117 # Revision 1.1 2004/05/16 19:05:38 nedko
118 # Initial revision of the gtk frontend.
120 # Revision 1.3 2004/05/11 01:33:48 nedko
121 # Add SQLite support.
123 # Revision 1.2 2004/05/03 20:48:48 nedko
124 # configuration file and update mode for cui
126 # Revision 1.1 2004/05/02 13:24:36 nedko
127 # Use makefile to build cui frontend(s).
129 ##############################################################################