source: auto/output/Makefile @ 9e0afb5

Last change on this file since 9e0afb5 was 9e0afb5, checked in by Mateusz Hromada <ruanda@…>, 15 years ago

Migration to new build system.

  • fla moved and checked
  • Property mode set to 100755
File size: 2.2 KB
RevLine 
[c08f3b1]1#!/bin/sh
2
3cat << EOF > Makefile
4# Default target
[12743b9]5.DEFAULT_GOAL = all
[c08f3b1]6
7SHELL = $SHELL
8CC = $CC
9BISON = $BISON
[44f59b8]10FLEX = $FLEX
[c08f3b1]11RM = $RM
12RMDIR = $RMDIR
13TEST = $TEST
14MAKE = $MAKE
15GREP = $GREP
16CUT = $CUT
17SORT = $SORT
18PR = $PR
19
20CFLAGS = $CFLAGS
21LDFLAGS = $LDFLAGS
22LDLIBS = $LDLIBS
23BFLAGS = $BFLAGS
24
25DESTDIR = $DESTDIR
26
27prefix = $prefix
28exec_prefix = $exec_prefix
29bindir = $bindir
30sbindir = $sbindir
31datarootdir = $datarootdir
32datadir = $datadir
33sysconfdir = $sysconfdir
34sharedstatedir = $sharestatedir
35localstatedir = $localstatedir
36
37ALL_CFLAGS = \$(CFLAGS)
38ALL_LDFLAGS = \$(LDFLAGS)
39ALL_LDLIBS = \$(LDLIBS)
40ALL_BFLAGS = \$(BFLAGS)
[44f59b8]41ALL_FFLAGS = -t \$(FFLAGS)
[c08f3b1]42
43VPATH = ./src
44
[9e0afb5]45PROGRAMS = tok sen fla
[12743b9]46
[44f59b8]47TOK_OBJ_FILES = tok.o tok_cmdline.o
48TOK_FLEX_FILES = tok.l
[12743b9]49TOK_GGO_FILES = tok_cmdline.ggo
50tok.o: tok_cmdline.h
51
[1e551bd]52SEN_OBJ_FILES = sen.o
53SEN_FLEX_FILES = sen.l
54
[9e0afb5]55FLA_OBJ_FILES = fla.o
56
[c08f3b1]57CONFIG_FILES = src/config.h Makefile
58
59.SUFFIXES:
60.SUFFIXES: .l .y .h .c .o
61
[12743b9]62.INTERMEDIATE: \$(patsubst %.l,%.c,\$(TOK_FLEX_FILES))
63.INTERMEDIATE: \$(patsubst %.ggo,%.c,\$(TOK_GGO_FILES))
64.INTERMEDIATE: \$(patsubst %.ggo,%.h,\$(TOK_GGO_FILES))
[1e551bd]65.INTERMEDIATE: \$(patsubst %.l,%.c,\$(SEN_FLEX_FILES))
66
[c08f3b1]67.PHONY: all
68all: \$(PROGRAMS)
[12743b9]69
[c08f3b1]70
71.PHONY: help
72help:
73        @\$(MAKE) --print-data-base --question |                \\
74        \$(GREP) '^[^.%][-A-Za-z0-9_]*:' |                      \\
75        \$(CUT) -f 1 -d : |                                     \\
76        \$(GREP) -v '^Makefile$$' |                             \\
77        \$(SORT) |                                              \\
78        \$(PR) --omit-pagination --width=80 --columns=4
79
80
81.PHONY: clean
82clean:
83        \$(RM) \$(PROGRAMS)
84        \$(RM) \$(TOK_OBJ_FILES)
[44f59b8]85        \$(RM) \$(patsubst %.l,%.c,\$(TOK_FLEX_FILES))
[12743b9]86        \$(RM) \$(patsubst %.ggo,%.c,\$(TOK_GGO_FILES))
87        \$(RM) \$(patsubst %.ggo,%.h,\$(TOK_GGO_FILES))
[1e551bd]88        \$(RM) \$(patsubst %.l,%.c,\$(SEN_FLEX_FILES))
[c08f3b1]89
90.PHONY: distclean
91distclean: clean
92        \$(RM) \$(CONFIG_FILES)
93
94.PHONY: install
95install: all
96        echo TODO: make install
97       
98.PHONY: uninstall
99uninstall:
100        echo TODO: make uninstall
101
102%.o: %.c
103        \$(CC) -c \$< -o \$@ \$(ALL_CFLAGS)
104
[12743b9]105%.c: %.l
[44f59b8]106        \$(FLEX) -t \$< > \$@
107
[12743b9]108%.c: %.ggo
[1e551bd]109        gengetopt --input $< --file-name \$(basename \$@) --conf-parser
[12743b9]110
111%.h: %.ggo
[1e551bd]112        gengetopt --input $< --file-name \$(basename \$@) --conf-parser
[12743b9]113
[c08f3b1]114%: %.o
115        \$(CC) \$? -o \$@ \$(ALL_LDFLAGS) \$(ALL_CFLAGS) \$(ALL_LDLIBS)
116
117tok: \$(TOK_OBJ_FILES)
118
119EOF
120
Note: See TracBrowser for help on using the repository browser.