/* Uncomment this if you want to install under /usr/local
 * instead of the places imake picks. */
#define UseUsrLocal	 

/* You shouldn't have to change anything below this line. */
/* ---------------------------------------------------------------- */

NAME=enlightenment

#ifdef UseUsrLocal
LIBDIR=/usr/local
#else
/* use default  LIBDIR */
#endif

ENLROOT=$(LIBDIR)/$(NAME)

#ifdef UseUsrLocal
BINDIR=$(ENLROOT)/bin
MANDIR=$(ENLROOT)/man
ETCDIR=$(ENLROOT)/system_config
IMGDIR=$(ENLROOT)/images/default
THMDIR=$(ENLROOT)/themes

#else
/* use default BINDIR, MANDIR */
ETCDIR=/etc/X11/$(NAME)
#endif /* UseUsrLocal */

CNFDIR=$(ETCDIR)

DEFINES = -DSYSCONFIG_DIR=\"$(ETCDIR)/\" -DTHEMES_DIR=\"$(THMDIR)/\"

/* if you have pgcc.. why the hell not... */
/* CC=pgcc */

/* 
 * add -g to use gdb debugging and make use of those extra optimisations in
 * pgcc...
 */
INCLUDES = -I. /* -g */ -s /* -mpentium -O9 */
SYS_LIBRARIES = $(XLIB)
LOCAL_LIBRARIES = -lm -lIm

SRCS = main.c lists.c draw.c events.c wininfo.c actions.c ewin.c loadcfg.c \
       root.c text.c status.c buttons.c alert.c iconify.c globals.c menus.c \
       infobox.c file.c regexp.c desktops.c misc.c states.c keys.c
OBJS = main.o lists.o draw.o events.o wininfo.o actions.o ewin.o loadcfg.o \
       root.o text.o status.o buttons.o alert.o iconify.o globals.o menus.o \
       infobox.o file.o regexp.o desktops.o misc.o states.o keys.o

ComplexProgramTarget($(NAME))

/* Create a link to /usr/local/enlightenment/bin/enlightenment
 * if we're putting stuff under /usr/local/. */
#ifdef UseUsrLocal
install::
	$(RM) $(LIBDIR)/bin/$(NAME)
	$(LN) ../$(NAME)/bin/$(NAME) $(LIBDIR)/bin/$(NAME)
#endif /* def UseUsrLocal */

/* Install configuration files in the right place. */
CNFSRC = ./sys_conf
CNFS = $(CNFSRC)/README
CNFFLAGS = -m 0644 -o root -g root 
InstallMultipleFlags($(CNFS),$(CNFDIR),$(CNFFLAGS))

/* Install any themes */
THEMESRC = ./themes
THEMES = $(wildcard $(THEMESRC)//**/*[^~])
THEMEFLAGS = -m 0644 -o root -g root
InstallMultipleFlags($(THEMES),$(THMDIR),$(THEMEFLAGS))

/* This allows `-I.' to work for the imlib header. */
includes::
	

clean::
	rm -f Makefile

