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

# preprocessor directives -D
DEFINES       := 

# 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        = cfileexitmenuitemlistener.so cmainformlistener.so cmenuitemdeletelistener.so cmetaclasstreeviewlistener.so

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

# main targets
all : $(TARGETS)

# shared library target 
%.so : %.c
	@echo "Compiling $@"
	@$(CC) -shared $(FLAGS) $^ -o $@ 

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

