blobwarsAttrition/common.mk

40 lines
968 B
Makefile
Raw Normal View History

2018-01-21 10:31:38 +01:00
VERSION = 0.1
REVISION = $(shell git rev-list HEAD 2>/dev/null | wc -l)
LOCALE_MO = $(patsubst %.po,%.mo,$(wildcard locale/*.po))
2018-01-21 17:50:14 +01:00
SEARCHPATH += src src/combat src/game src/system src/util src/widgets src/world
2018-01-21 10:31:38 +01:00
vpath %.c $(SEARCHPATH)
vpath %.h $(SEARCHPATH)
DEPS += defs.h structs.h
2018-01-22 08:23:23 +01:00
OBJS += camera.o combat.o
2018-01-21 10:31:38 +01:00
OBJS += draw.o
2018-01-22 08:44:15 +01:00
OBJS += effects.o entities.o explosions.o
2018-01-21 10:31:38 +01:00
OBJS += game.o
2018-01-21 12:26:02 +01:00
OBJS += hud.o
2018-01-22 09:27:08 +01:00
OBJS += init.o input.o io.o items.o
2018-01-21 10:31:38 +01:00
OBJS += lookup.o
2018-01-21 12:12:49 +01:00
OBJS += main.o map.o maths.o
2018-01-21 13:57:01 +01:00
OBJS += objectives.o
2018-01-23 08:42:13 +01:00
OBJS += particles.o player.o
2018-01-21 12:31:53 +01:00
OBJS += quadtree.o
2018-01-22 08:44:15 +01:00
OBJS += sound.o sprites.o
2018-01-21 13:19:07 +01:00
OBJS += text.o textures.o title.o triggers.o
2018-01-21 10:31:38 +01:00
OBJS += util.o
2018-01-22 09:27:08 +01:00
OBJS += weapons.o widgets.o
2018-01-21 10:31:38 +01:00
# 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)