# This file was automatically generated by makemake.
# Do not edit it directly!
# Any changes you make will be silently overwritten.

# Makefile for hewx
# wxWindows port of Hugo by Kent Tessman (c) 2001
#
# (generated by makemake)
#
# Makemake will generate a huge number of *.h dependencies at the end of
# this file.  If they cause problems, just delete everything after the
# Hugo header files (h*header.h, htokens.h, hdinter.h, hewx.h).

# These may have to be changed depending on where things are installed:
# (The wxWindows file locations should really be gotten from wx-config.)
HUGOSOURCEDIR = ../source
WXINCLUDEDIR = /usr/local/lib/wx/include
MIKMODINCLUDEDIR = /usr/local/include
CXXINCLUDEDIR = /usr/include/g++-2

# Libraries to be linked:
# If a working libmikmod.so has been compiled on the runtime system
# and the wxGTK library is installed:
LDFLAGS = -lwx_gtk -lgtk -lgdk -lpthread $(shell sdl-config --libs) -lSDL_mixer
STATICLIBS =
# Otherwise, use these LDFLAGS and STATICLIBS:
#LDFLAGS = -lwx_gtk -lgtk -lgdk -lpthread -lmikmod
#STATICLIBS = /usr/local/lib/libmikmod.a

# Hopefully nothing below here will need to be changed:

# Useful directories

MYCODEDIR := .

# Directories to search for header files

SEARCHDIRS := -I- -I${MYCODEDIR} -I${HUGOSOURCEDIR} -I${WXINCLUDEDIR} -I${MIKMODINCLUDEDIR} -I${CXXINCLUDEDIR}

# makemake variables

LINKER       := gcc
DEPENDFLAGS  := ${SEARCHDIRS}
TOUCHHEADERS := ${MYCODEDIR}/*.h

# C

CC     := gcc
# Debugging:
#CFLAGS  = ${DEPENDFLAGS} -D__WXGTK__ -DWXWINDOWS -DCOMPILE_V25 -fwritable-strings -fno-rtti -g3 -Wall $(shell sdl-config --cflags)
# Release build:
CFLAGS  = ${DEPENDFLAGS} -D__WXGTK__ -DWXWINDOWS -DCOMPILE_V25 -fwritable-strings -fno-rtti -O2 -Wall $(shell sdl-config --cflags)

# C++

CXX      := g++
#CXXFLAGS  = ${DEPENDFLAGS}
CXXFLAGS = ${CFLAGS}

%.o : %.cpp
	${CXX} ${CPPFLAGS} -c $< ${CXXFLAGS}

%.o : %.cxx
	${CXX} ${CPPFLAGS} -c $< ${CXXFLAGS}

# C preprocessor

CPPFLAGS = 

# linker

LOADLIBES   := -lm $(STATICLIBS)



# This is what makemake added


# ./hewx

./hewx : ../source/he.o ../source/heexpr.o ../source/hemisc.o ../source/heobject.o ../source/heparse.o ../source/heres.o ../source/herun.o ../source/heset.o ../source/stringfn.o ./hewx.o ./hewxwin.o ./hejpeg.o ./hepath.o ./hesound.o ./hevideo.o
	${LINKER} ${LDFLAGS} -o $@ ${filter-out %.a %.so, $^} ${LOADLIBES}

# target for making everything

.PHONY : all
all: ./hewx


# target for removing all object files

.PHONY : tidy
tidy::
	@${RM} core ../source/he.o ../source/heexpr.o ./hejpeg.o ../source/hemisc.o ../source/heobject.o ../source/heparse.o ./hepath.o ../source/heres.o ../source/herun.o ../source/heset.o ./hesound.o ./hewx.o ./hewxwin.o ../source/stringfn.o

# target for removing all object files

.PHONY : clean
clean:: tidy
	@${RM} ./hewx

# list of all source files

MM_ALL_SOURCES := ../source/he.c ../source/heexpr.c ./hejpeg.cpp ../source/hemisc.c ../source/heobject.c ../source/heparse.c ./hepath.c ../source/heres.c ../source/herun.c ../source/heset.c ./hesound.cpp ./hevideo.cpp ./hewx.cpp ./hewxwin.cpp ../source/stringfn.c


# target for checking a source file

CHECKSYNTAXFILE := ${basename ${filter %${CHECKSTRING}, ${MM_ALL_SOURCES}}}

.PHONY : checksyntax
checksyntax:
  ifneq (${CHECKSYNTAXFILE},)
	@${MAKE} ${addsuffix .o, ${CHECKSYNTAXFILE}}
  else
	@echo No target to make ${CHECKSTRING}
  endif


# target for touching appropriate source files

.PHONY : touch
touch::
	@list=$$(grep -l ${TOUCHSTRING} ${MM_ALL_SOURCES}); \
     for file in $$list; do { echo $$file; touch $$file; } done


# target for calculating dependencies (MAKEMAKE)

.PHONY : jdepend
jdepend:
	@${MAKEMAKE} --depend Makefile -- ${DEPENDFLAGS} --  ../source/he.c ../source/he.o ../source/heexpr.c ../source/heexpr.o ./hejpeg.cpp ./hejpeg.o ../source/hemisc.c ../source/hemisc.o ../source/heobject.c ../source/heobject.o ../source/heparse.c ../source/heparse.o ./hepath.c ./hepath.o ../source/heres.c ../source/heres.o ../source/herun.c ../source/herun.o ../source/heset.c ../source/heset.o ./hesound.cpp ./hesound.o ./hevideo.cpp ./hevideo.o ./hewx.cpp ./hewx.o ./hewxwin.cpp ./hewxwin.o ../source/stringfn.c ../source/stringfn.o


# DO NOT DELETE THIS LINE -- makemake depends on it.
