########################
# constant definitions #
########################

# preprocessor directives -D
DEFINES       := 

# library dependencies
LIBS          := `pkg-config --libs libgenerics-1.2`
LIBS	      += `pkg-config --libs gtk+-2.0`
LIBS	      += ./libgtkol-1.2.so

# include paths
INCLUDES      := ../../include
INCLUDEDEPS   := `pkg-config --cflags libgenerics-1.2`
INCLUDEDEPS   += `pkg-config --cflags gtk+-2.0`
INCLUDEDEPS   += `pkg-config --cflags libxml-2.0`

# source files directory to compile
SOURCES	      := ./

# gcc directives
CC 	       = c++
FLAGS 	       = -Wno-multichar -O2 $(DEFINES) -I$(INCLUDES) $(INCLUDEDEPS)

# makefile targets (shared and static libraries)
TARGETS        = gtkol-runtime


#################
# Makefile body #
#################

# main targets
all : $(TARGETS)

# shared library target 
gtkol-runtime : gtkol-runtime.c
	@echo "Compiling $@"
	@$(CC) -rdynamic $(FLAGS) $^ -o $@ $(LIBS)

# clean request
clean :
	@echo -n "Cleaning $(TARGETS) *.o *~ "
	@rm -rf $(TARGETS) *.o *~ 
	@echo done.

