[gtkmm] Help with Makefile



I am not an expert creating 'Makefile' files, I have what I would call a limited knowledge of it. However, not only to improve my understanding about make, but also gtkmm2, I want to write my own 'Makefile' to compile the gtkmm2 programs, but I am having a bit of a problem doing this. So, I'd like someone here to, please have a look at the attached files and let me know what I am doing wrong.

Thanks in advance.

PD: make complaints saying that
# Makefile

# Compiler name
CC=g++

# Libraries to be included
LDLIBS=`pkg-config gtkmm-2.0--libs`

# Flagas
CFLAGS=-Wall -g `pkg-config gtkmm-2.0 --cflags`
#CFLAGS=-Wall -g

# Variables
OBJS = gtkmmtest.o #other_objects.o

#Application name
gtkmmtest: $(OBJS)
	$(CC) $(OBJS) $(LDLIBS)  -o gtkTest

gtkmmtest.o: gtkmmtest.cc 
	$(CC) $(CFLAGS) -c gtkmmtest.cc

	
#other_header.o: other_hearder.H
#	$(CC) $(CFLAGS) -c other_header.cc


# Remove the following files

clean:
	rm -f *.o
#	rm -f beep

PHONY: clean
#include <gtkmm.h>

int main(int argc, char *argv[])
{
    Gtk::Main kit(argc, argv);

    Gtk::Window window;
    kit.run(window);
    
    return 0;
}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]