1 ##############################################################################
3 # $Id: GNUmakefile,v 1.6 2004/11/21 14:02:54 nedko Exp $
6 # Makefile for console mediadatabase frontends
9 # Nedko Arnaudov <nedko@users.sourceforge.net>
12 # GNU GENERAL PUBLIC LICENSE version 2
14 ##############################################################################
18 include $(PATHTOTOP
)common.mk
20 GTK_ATLEAST_VERSION
=2.4
21 GTK_OK
:= $(shell if pkg-config
--atleast-version
=$(GTK_ATLEAST_VERSION
) gtk
+-2.0 ;then echo yes
; else echo no
; fi
)
24 CFLAGS
+= -g
-Wall
$(shell pkg-config
--cflags gtk
+-2.0)
25 LINKFLAGS
+= -g
$(shell pkg-config
--libs gtk
+-2.0)
27 SOURCES
= main.c medias.c media.c helper.c menu.c search.c
29 OBJECTS
= $(SOURCES
:%.c
=%.o
)
30 DEP_FILES
= $(OBJECTS
:.o
=.d
)
37 $(ECHO
) "Compiling $< to $@ ..."
38 $(CC
) $(CFLAGS
) $< -o
$@
41 @echo
"Creating dependency file $@ for $<"
45 $(ECHO
) "Removing dependency files ..."
46 $(RM_BEGIN
) $(DEP_FILES
) $(RM_END
)
49 $(ECHO
) "Cleaning ..."
50 $(RM_BEGIN
) mdb_gtk
$(RM_END
)
51 $(RM_BEGIN
) $(OBJECTS
) $(RM_END
)
55 mdb_gtk
: $(OBJECTS
) ..
/libfrontend
/libfrontend.a ..
/libdb
/libdb.a
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
)))
68 @echo
"Not building GTK frontend because cannot find good version of GTK+ (at least $(GTK_ATLEAST_VERSION))"
71 ##############################################################################
75 # !!! WARNING !!! Following lines are automatically updated by the CVS system.
77 # $Log: GNUmakefile,v $
78 # Revision 1.6 2004/11/21 14:02:54 nedko
79 # Check for GTK+ version
81 # Revision 1.5 2004/09/01 05:01:23 nedko
82 # Use common c/c++ flags
83 # Depend on internat libraries.
85 # Revision 1.4 2004/08/31 22:40:15 nedko
86 # Partitally implemented search feature.
88 # Revision 1.3 2004/06/20 12:24:21 nedko
89 # Use dependency files.
90 # Use common tool variables.
92 # Revision 1.2 2004/05/21 23:43:38 nedko
93 # Implement media window.
95 # Revision 1.1 2004/05/16 19:05:38 nedko
96 # Initial revision of the gtk frontend.
98 # Revision 1.3 2004/05/11 01:33:48 nedko
101 # Revision 1.2 2004/05/03 20:48:48 nedko
102 # configuration file and update mode for cui
104 # Revision 1.1 2004/05/02 13:24:36 nedko
105 # Use makefile to build cui frontend(s).
107 ##############################################################################