39 lines
880 B
Makefile
39 lines
880 B
Makefile
VERSION = 0.1
|
|
REVISION = $(shell git rev-list HEAD 2>/dev/null | wc -l)
|
|
LOCALE_MO = $(patsubst %.po,%.mo,$(wildcard locale/*.po))
|
|
|
|
SEARCHPATH += src src/combat src/game src/system src/util src/widgets src/world
|
|
vpath %.c $(SEARCHPATH)
|
|
vpath %.h $(SEARCHPATH)
|
|
|
|
DEPS += defs.h structs.h
|
|
|
|
OBJS += camera.o
|
|
OBJS += draw.o
|
|
OBJS += combat.o
|
|
OBJS += entities.o
|
|
OBJS += game.o
|
|
OBJS += hud.o
|
|
OBJS += init.o input.o io.o
|
|
OBJS += lookup.o
|
|
OBJS += main.o map.o maths.o
|
|
OBJS += objectives.o
|
|
OBJS += quadtree.o
|
|
OBJS += text.o textures.o title.o triggers.o
|
|
OBJS += util.o
|
|
OBJS += widgets.o
|
|
|
|
# top-level rule to create the program.
|
|
all: $(PROG) $(LOCALE_MO)
|
|
|
|
# compiling other source files.
|
|
%.o: %.c %.h $(DEPS)
|
|
$(CC) $(CFLAGS) $(CXXFLAGS) -c $<
|
|
|
|
%.mo: %.po
|
|
msgfmt -c -o $@ $<
|
|
|
|
# cleaning everything that can be automatically recreated with "make".
|
|
clean:
|
|
$(RM) $(OBJS) $(PROG) $(LOCALE_MO)
|