cropper

changeset 9:7e1cf00de1df

completely refactored makefile; removed interface.h
author meillo@marmaro.de
date Thu, 20 Mar 2008 20:01:38 +0100
parents b0824876d379
children 5e282003f0c1
files Makefile callbacks.c interface.c interface.h main.c main.h
diffstat 6 files changed, 29 insertions(+), 26 deletions(-) [+]
line diff
     1.1 --- a/Makefile	Thu Mar 20 19:31:44 2008 +0100
     1.2 +++ b/Makefile	Thu Mar 20 20:01:38 2008 +0100
     1.3 @@ -1,26 +1,34 @@
     1.4 -# basic GTK+ app makefile
     1.5 -SOURCES = interface.c callbacks.c support.c main.c interface.h callbacks.h support.h
     1.6 -OBJS    = ${SOURCES:.c=.o}
     1.7 -#CFLAGS  = `gtk-config --cflags`
     1.8 -#LDADD   = `gtk-config --libs --cflags`
     1.9 -datadir = /usr/local/share
    1.10 -CFLAGS  = `pkg-config --cflags gtk+-2.0`
    1.11 -LDADD   = `pkg-config --libs --cflags gtk+-2.0`
    1.12 -CC      = gcc
    1.13 -PACKAGE = cropper
    1.14 +# makefile for cropper
    1.15  
    1.16 +NAME    = cropper
    1.17  
    1.18 +SRC = interface.c callbacks.c support.c main.c
    1.19 +DEP = main.h callbacks.h support.h
    1.20 +OBJ = ${SRC:.c=.o}
    1.21  
    1.22 -all : ${OBJS}
    1.23 -	${CC} -o ${PACKAGE} ${OBJS} ${LDADD}
    1.24 +CC = gcc
    1.25 +CFLAGS = `pkg-config --cflags gtk+-2.0`
    1.26 +LDFLAGS = `pkg-config --libs --cflags gtk+-2.0`
    1.27 +
    1.28 +
    1.29 +
    1.30 +all: ${NAME}
    1.31 +
    1.32 +${NAME}: ${OBJ} ${DEP}
    1.33 +	${CC} -o ${NAME} ${OBJ} ${LDFLAGS}
    1.34  
    1.35  .c.o:
    1.36  	${CC} ${CFLAGS} -c $<
    1.37  
    1.38  
    1.39 +support.o: support.h
    1.40 +interface.o: main.h callbacks.h support.h
    1.41 +callbacks.o: main.h callbacks.h support.h
    1.42 +main.o: main.h support.h
    1.43 +
    1.44 +
    1.45  clean:
    1.46  	rm -f *.o
    1.47 -	rm -f ${PACKAGE}
    1.48  
    1.49 -
    1.50 -# end of file
    1.51 +realclean: clean
    1.52 +	rm -f ${NAME}
     2.1 --- a/callbacks.c	Thu Mar 20 19:31:44 2008 +0100
     2.2 +++ b/callbacks.c	Thu Mar 20 20:01:38 2008 +0100
     2.3 @@ -3,7 +3,6 @@
     2.4  
     2.5  #include "main.h"
     2.6  #include "callbacks.h"
     2.7 -#include "interface.h"
     2.8  #include "support.h"
     2.9  
    2.10  int image_width;
    2.11 @@ -225,12 +224,12 @@
    2.12  	gtk_main_quit();
    2.13  }
    2.14  
    2.15 -void on_cropper_window_create (GtkObject* object, gpointer user_data) {
    2.16 +void on_cropper_window_create(GtkObject* object, gpointer user_data) {
    2.17  	image_width = gdk_pixbuf_get_width(image_buffer);
    2.18  	image_height = gdk_pixbuf_get_height(image_buffer);
    2.19  }
    2.20  
    2.21 -void on_cropper_window_destroy (GtkObject* object, gpointer user_data) {
    2.22 +void on_cropper_window_destroy(GtkObject* object, gpointer user_data) {
    2.23  	gtk_main_quit();
    2.24  }
    2.25  
     3.1 --- a/interface.c	Thu Mar 20 19:31:44 2008 +0100
     3.2 +++ b/interface.c	Thu Mar 20 20:01:38 2008 +0100
     3.3 @@ -10,7 +10,6 @@
     3.4  
     3.5  #include "main.h"
     3.6  #include "callbacks.h"
     3.7 -#include "interface.h"
     3.8  #include "support.h"
     3.9  
    3.10  #define GLADE_HOOKUP_OBJECT(component,widget,name) \
     4.1 --- a/interface.h	Thu Mar 20 19:31:44 2008 +0100
     4.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.3 @@ -1,6 +0,0 @@
     4.4 -#include<gtk/gtk.h>
     4.5 -
     4.6 -GtkWidget* create_cropper_window(void);
     4.7 -
     4.8 -
     4.9 -GdkPixbuf *image_buffer;
     5.1 --- a/main.c	Thu Mar 20 19:31:44 2008 +0100
     5.2 +++ b/main.c	Thu Mar 20 20:01:38 2008 +0100
     5.3 @@ -1,7 +1,6 @@
     5.4  #include <gtk/gtk.h>
     5.5  
     5.6  #include "main.h"
     5.7 -#include "interface.h"
     5.8  #include "support.h"
     5.9  
    5.10  
     6.1 --- a/main.h	Thu Mar 20 19:31:44 2008 +0100
     6.2 +++ b/main.h	Thu Mar 20 20:01:38 2008 +0100
     6.3 @@ -6,4 +6,8 @@
     6.4  GtkWidget* cropper_window;
     6.5  char* image_filename;
     6.6  
     6.7 +/* from interface.h */
     6.8 +GtkWidget* create_cropper_window(void);
     6.9 +GdkPixbuf *image_buffer;
    6.10 +
    6.11  #endif