source: src/tok.l/Makefile

Last change on this file was 243d027, checked in by Tomasz Obrebski <to@…>, 11 years ago

tok accepts options and prints help message now

  • Property mode set to 100644
File size: 649 bytes
Line 
1include ../../config.mak
2
3ifeq ($(BUILD_STATIC), yes)
4  LDFLAGS += -static
5endif
6
7LDFLAGS +=
8CFLAGS += -O2
9
10tok: lex.yy.c
11        $(CC) $(CFLAGS) -o tok lex.yy.c tok_cmdline.c -lfl $(LDFLAGS)
12
13lex.yy.c: tok_cmdline.h tok_cmdline.c
14        $(FLEX) tok.l
15
16tok_cmdline.h tok_cmdline.c: tok_cmdline.ggo
17        $(GENGETOPT) -i tok_cmdline.ggo --conf-parser --file=tok_cmdline
18
19.PHONY: install
20install:
21ifdef BIN_DIR
22        install -m 0755 tok $(BIN_DIR)
23endif
24
25.PHONY: uninstall
26uninstall:
27ifdef BIN_DIR
28        rm $(BIN_DIR)/tok
29endif
30
31clean: clean.cmdline clean.flex
32        rm tok || true
33
34clean.cmdline:
35        rm tok_cmdline.c || true
36        rm tok_cmdline.h || true
37
38clean.flex:
39        rm lex.yy.c || true
Note: See TracBrowser for help on using the repository browser.