]> git.cworth.org Git - ttt/blobdiff - src/Makefile.am
Add a dependency of ttt-client.c on ttt-lex.h to fix the build.
[ttt] / src / Makefile.am
index 1d5de3f7669f20af0daa85e2f09edf2e73266f81..435e22d77e9db8e2baf7fa7db1c2525bc23dc963 100644 (file)
@@ -1,4 +1,4 @@
-bin_PROGRAMS = ttt-server ttt-client
+bin_PROGRAMS = ttt-server ttt-client ttt-curses-client
 noinst_PROGRAMS = test-board
 
 ttt_common_sources =           \
@@ -9,11 +9,18 @@ ttt_common_sources =          \
        ttt-error.c             \
        ttt-error.h             \
        ttt-lex.l               \
+       ttt-lex.h               \
        ttt-socket.c            \
        ttt-socket.h            \
        x.c                     \
        x.h
 
+AM_LFLAGS = --header=ttt-lex.h -Cr
+ttt-lex.h: ttt-lex.l
+       $(SHELL) $(YLWRAP) $< $@ $@ -- $(LEXCOMPILE)
+
+ttt-client.c: ttt-lex.h
+
 ttt_client_SOURCES =           \
        $(ttt_common_sources)   \
        ttt.c
@@ -27,9 +34,13 @@ test_board_SOURCES =         \
        $(ttt_common_sources)   \
        test-board.c
 
+ttt_curses_client_SOURCES =     \
+       $(ttt_common_sources)   \
+       curses.h                \
+        ttt-curses-client.c
+
 AM_CFLAGS = $(WARN_CFLAGS) $(TTT_CFLAGS)
-AM_LFLAGS = --header-file=ttt-lex.h -Cr
 ttt_client_LDFLAGS = $(TTT_LIBS)
 ttt_server_LDFLAGS = $(TTT_LIBS) -lpthread
 test_board_LDFLAGS = $(TTT_LIBS)
-
+ttt_curses_client_LDFLAGS = $(TTT_LIBS) -lncurses