Makefile.am 3.94 KB
Newer Older
1 2
## Process this file with automake to produce Makefile.in

3 4 5 6 7 8 9
AUTOMAKE_OPTIONS = subdir-objects

# Initialize automake variables
AM_CFLAGS   = @FD_CFLAGS@
AM_CPPFLAGS = @FD_CPPFLAGS@
AM_LDFLAGS  = @FD_LDFLAGS@
LIBS        = @FD_LIBS@ @LIBS@
10

11
freedroidRPG_LDADD =
12
if WIN32
13
freedroidRPG_LDADD += $(top_builddir)/win32/freedroidRPG.coff
14 15 16 17
endif

bin_PROGRAMS = freedroidRPG

18 19 20 21 22 23 24 25 26 27 28 29 30
freedroidRPG_SOURCES = \
	action.c addon_crafting_ui.c animate.c armor.c automap.c \
	benchmark.c BFont.c blocks.c bullet.c \
	character.c chat.c colldet.c \
	dynarray.c \
	enemy.c event.c \
	faction.c floor_tiles.c font.c \
	game_ui.c getopt.c getopt1.c graphics.c \
	hud.c \
	image.c influ.c init.c input.c items.c item_upgrades.c item_upgrades_ui.c \
	keyboard.c \
	lang.c light.c lists.c lua.c luaconfig.c \
	main.c map.c map_label.c menu.c misc.c mission.c \
31
	npc.c \
32 33
	obstacle.c obstacle_extension.c open_gl.c open_gl_atlas.c open_gl_debug.c \
	pathfinder.c pngfuncs.c \
34
	quest_browser_ui.c \
35 36 37 38
	rtprof.c \
	saveloadgame.c savestruct_internal.c scandir.c shop.c skills.c sound.c sound_effects.c string.c \
	takeover.c text.c text_public.c \
	view.c \
39
	waypoint.c \
40 41 42 43 44 45 46
	\
	BFont.h defs.h getopt.h global.h lang.h lists.h map.h pngfuncs.h proto.h savestruct_internal.h scandir.h struct.h system.h takeover.h vars.h \
	\
	gen_savestruct.py \
	\
	lua/luaFD.c lua/luaFD.h lua/luaFD_bindings.h lua/luaFD_tux.c lua/luaFD_npc.c \
	\
47 48 49
	lvledit/lvledit.c lvledit/lvledit.h \
	lvledit/lvledit_actions.c lvledit/lvledit_actions.h \
	lvledit/lvledit_beautify_actions.c lvledit/lvledit_beautify_actions.h \
50
	lvledit/lvledit_display.c lvledit/lvledit_display.h \
51
	lvledit/lvledit_enemy.c \
52
	lvledit/lvledit_input.c \
53 54 55 56 57 58 59
	lvledit/lvledit_map.c lvledit/lvledit_map.h \
	lvledit/lvledit_menu.c lvledit/lvledit_menu.h \
	lvledit/lvledit_object_lists.c lvledit/lvledit_object_lists.h \
	lvledit/lvledit_tools.c lvledit/lvledit_tools.h \
	lvledit/lvledit_tool_move.c lvledit/lvledit_tool_move.h \
	lvledit/lvledit_tool_place.c lvledit/lvledit_tool_place.h \
	lvledit/lvledit_tool_select.c lvledit/lvledit_tool_select.h \
60 61
	lvledit/lvledit_validator.c lvledit/lvledit_validator.h \
	lvledit/lvledit_widgets.c lvledit/lvledit_widgets.h \
62
	lvledit/lvledit_widget_categoryselect.c lvledit/lvledit_widget_categoryselect.h \
63
	lvledit/lvledit_widget_map.c lvledit/lvledit_widget_map.h \
64
	lvledit/lvledit_widget_minimap.c lvledit/lvledit_widget_minimap.h \
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93
	lvledit/lvledit_widget_toolbar.c lvledit/lvledit_widget_toolbar.h \
	\
	mapgen/gram_simple.c \
	mapgen/mapgen.c mapgen/mapgen.h \
	mapgen/themes.c mapgen/themes.h \
	\
	savegame/convert.c savegame/savegame.h \
	savegame/filters_0_16.c \
	\
	widgets/widgets.c widgets/widgets.h \
	widgets/widget_background.c widgets/widget_background.h \
	widgets/widget_button.c widgets/widget_button.h \
	widgets/widget_group.c widgets/widget_group.h \
	widgets/widget_text.c widgets/widget_text.h \
	widgets/widget_text_list.c widgets/widget_text_list.h

EXTRA_DIST =

# Generated files rules, to be created before sources compilation
nodist_freedroidRPG_SOURCES = build_flags.h savestruct.c savestruct.h version.c
BUILT_SOURCES =  build_flags.h savestruct.h version.c
CLEANFILES = build_flags.h savestruct.c savestruct.h version.c

build_flags.h: Makefile
	@echo '#define BUILD_CFLAGS "$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)"' >$@
	@echo '#define BUILD_LDFLAGS "$(AM_LDFLAGS) $(LDFLAGS) $(freedroidRPG_LDADD) $(LIBS)"' >>$@

savestruct.h: struct.h savestruct_internal.h gen_savestruct.py
	$(PYTHON) $(srcdir)/gen_savestruct.py $(srcdir)/struct.h savestruct
94

95 96 97 98 99 100 101 102 103
version.c: dummy
	@if $$(git status >&/dev/null) ; then \
	 	version_string=`echo "char *freedroid_version = \"$$(git describe --tags 2>/dev/null || echo "@PACKAGE_VERSION@")$$(git diff --exit-code >& /dev/null || echo "_mod")\";"` ; \
	 else \
	 	version_string=`echo "char *freedroid_version = \"@PACKAGE_VERSION@\";"` ; \
	 fi ; \
	 if ! $$(echo $$version_string | cmp -s - $@) ; then \
	 	echo $$version_string > $@ ; \
	 fi
104

105
dummy:
106

107
.PHONY: dummy