Makefile fixup.
[cboard.git] / src / Makefile.am
blob7069891626fd0a862c23acfb9cc3695c6c699a61
1 bin_PROGRAMS = cboard
2 cboard_SOURCES = cboard.c message.c message.h misc.c engine.c \
3                  engine.h input.c input.h rcfile.c rcfile.h colors.c \
4                  colors.h window.h window.c conf.h misc.h common.h \
5                  menu.c menu.h tags.c tags.h keys.h filebrowser.c filebrowser.h
6 cboard_LDFLAGS = @PANEL_LIB@ @MENU_LIB@ @FORM_LIB@ @CURSES_LIB@
7 cboard_LDADD = $(top_builddir)/libchess/libchess.a
8 cboard_CPPFLAGS = -DDATA_PATH=\"$(pkgdatadir)\" -I$(top_srcdir)/libchess \
9                   -DLOCALE_DIR=\"$(prefix)/share/locale\"
11 if WITH_LIBPERL
12 cboard_SOURCES += perl.c perl.h
13 LIBPERL_CFLAGS += @LIBPERL_CFLAGS@
14 cboard_LDFLAGS += @LIBPERL_LDFLAGS@
16 # This is needed because LIBPERL_CFLAGS has form.h in the include path which
17 # conflicts with the curses form.h which is normally in a standard system
18 # include path that gcc -I ignores.
19 perl.o: perl.c
20         $(CC) $(CFLAGS) $(CPPFLAGS) $(LIBPERL_CFLAGS) -c $< -o $@
21 endif
23 if WITH_DEBUG
24 CPPFLAGS += -DDEBUG
25 endif
27 if NO_STRSEP
28 cboard_SOURCES += $(top_srcdir)/osdep/strsep.c
29 endif
31 if NO_ERR_H
32 cboard_SOURCES += $(top_srcdir)/osdep/err.c
33 CPPFLAGS += -I$(top_srcdir)/osdep
34 endif