1#****************************************************************************
2#
3# Makefile for Kyra.
4# Lee Thomason and David Leimbach
5# www.grinninglizard.com
6# www.sourceforge.net/projects/kyra
7#
8# This is a GNU make (gmake) makefile
9#****************************************************************************
10
11include ../makefilebuild
12
13
14#****************************************************************************
15# Targets of the build
16#****************************************************************************
17
18OUTPUT := krspriteed
19
20all: ${OUTPUT}
21
22#****************************************************************************
23# Source files
24#****************************************************************************
25
26SRCS := dom.cpp \
27		CONSOLEFONT.cpp \
28		sharedstate.cpp \
29		spriteed.cpp \
30		statealign.cpp \
31		stateempty.cpp \
32		statemachine.cpp \
33		statemovie.cpp \
34		stateview.cpp \
35		statehelp.cpp
36
37# Add on the sources for libraries
38SRCS := ${SRCS}
39
40OBJS := $(addsuffix .o,$(basename ${SRCS}))
41
42#****************************************************************************
43# Output
44#****************************************************************************
45
46${OUTPUT}: ${OBJS} ../engine/libkyra.a
47	${LD} -o $@ ${LDFLAGS} ${OBJS} ../engine/libkyra.a ${LIBS} ${EXTRA_LIBS}
48
49#****************************************************************************
50# common rules
51#****************************************************************************
52
53# Rules for compiling source files to object files
54%.o : %.cpp
55	${CXX} -c ${CXXFLAGS} ${INCS} $< -o $@
56
57%.o : %.c
58	${CC} -c ${CFLAGS} ${INCS} $< -o $@
59
60clean:
61	-rm -f core ${OBJS} ${OUTPUT}
62
63#depend:
64#	makedepend ${INCS} ${SRCS}
65
66install: ${OUTPUT}
67	install -m755 krspriteed /usr/local/bin
68
69    #mkdir -p /usr/local/include/Kyra/spriteed ; \
70	#install -m755 *.h /usr/local/include/Kyra/spriteed
71
72# Dependencies. Badly over included, but there were just too many problems
73# using makedepend and sharing the makefiles.
74
75include ../makefiledefines
76${OBJS} :  $(addprefix ../engine/, ${ENGINE_HEADERS}) $(addprefix ../util/, ${UTIL_HEADERS}) $(addprefix ../gui/, ${GUI_HEADERS}) \
77           dom.h  sharedstate.h  statemachine.h  statemovie.h  states.h
78
79
80