########

# hybris makefile (0.5.2)
# compatible with both GNU Make and Turbo Make

### options

# Please select exactly one display implementation
# usually, curses is for Unix, and conio for DOS

DISPLAY = ncurses
#DISPLAY = conio

# you may need to set one or several of these
# if the corresponding library is not in the default libraries
# (TurboC++ has conio within the defaults)
LIBS += -lncurses
# LIBS += -lconio

# used commands
RM = rm -f
#RM = xdel

# filename suffixing
#O = obj
O = o
#EXEC = .exe
EXEC =

# other compiling options

#OPTS = -mc -Ic:\opt\tc\include
#LOPTS = -mc -Lc:\opt\tc\lib
OPTS = -g -O1 -Wall -pedantic 
LOPTS =

### description of goals 'build', 'clean', and 'depend'.

build:: hybris$(EXEC)

clean::
	$(RM) $(OBJS) hybris$(EXEC) core

# rebuilding the makefile requires Perl
depend::
	depend/dep.pl

### description of dependencies (sub-goals of build)

OBJS = object.$(O) event.$(O) tree.$(O) hybris.$(O) $(DISPLAY).$(O) \
tree.$(O) vtree.$(O) vtext.$(O) gui.$(O) widget.$(O) loadpepe.$(O)


hybris$(EXEC): $(OBJS)
	$(CC) $(LOPTS) -o$@ $(OBJS) $(LIBS)

event.$(O): \depend event.c
	$(CC) $(OPTS) -o$@ -c event.c

tree.$(O): \depend tree.c
	$(CC) $(OPTS) -o$@ -c tree.c

hybris.$(O): \depend hybris.c
	$(CC) $(OPTS) -o$@ -c hybris.c

vtree.$(O): \depend vtree.c
	$(CC) $(OPTS) -o$@ -c vtree.c

vtext.$(O): \depend vtext.c
	$(CC) $(OPTS) -o$@ -c vtext.c

gui.$(O): \depend gui.c
	$(CC) $(OPTS) -o$@ -c gui.c

widget.$(O): \depend widget.c
	$(CC) $(OPTS) -o$@ -c widget.c

loadpepe.$(O): \depend loadpepe.c
	$(CC) $(OPTS) -o$@ -c loadpepe.c

$(DISPLAY).$(O): \depend display.h
	$(CC) $(OPTS) -o$@ -c $(DISPLAY).c
