source: auto/output/Makefile @ 1e551bd

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

Migration to new build system.

  • sen moved and checked
  • Property mode set to 100755
File size: 2.1 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
[1e551bd]45PROGRAMS = tok sen
[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
[c08f3b1]55CONFIG_FILES = src/config.h Makefile
56
57.SUFFIXES:
58.SUFFIXES: .l .y .h .c .o
59
[12743b9]60.INTERMEDIATE: \$(patsubst %.l,%.c,\$(TOK_FLEX_FILES))
61.INTERMEDIATE: \$(patsubst %.ggo,%.c,\$(TOK_GGO_FILES))
62.INTERMEDIATE: \$(patsubst %.ggo,%.h,\$(TOK_GGO_FILES))
63
[1e551bd]64.INTERMEDIATE: \$(patsubst %.l,%.c,\$(SEN_FLEX_FILES))
65
[c08f3b1]66.PHONY: all
67all: \$(PROGRAMS)
[12743b9]68
[c08f3b1]69
70.PHONY: help
71help:
72        @\$(MAKE) --print-data-base --question |                \\
73        \$(GREP) '^[^.%][-A-Za-z0-9_]*:' |                      \\
74        \$(CUT) -f 1 -d : |                                     \\
75        \$(GREP) -v '^Makefile$$' |                             \\
76        \$(SORT) |                                              \\
77        \$(PR) --omit-pagination --width=80 --columns=4
78
79
80.PHONY: clean
81clean:
82        \$(RM) \$(PROGRAMS)
83        \$(RM) \$(TOK_OBJ_FILES)
[44f59b8]84        \$(RM) \$(patsubst %.l,%.c,\$(TOK_FLEX_FILES))
[12743b9]85        \$(RM) \$(patsubst %.ggo,%.c,\$(TOK_GGO_FILES))
86        \$(RM) \$(patsubst %.ggo,%.h,\$(TOK_GGO_FILES))
[1e551bd]87        \$(RM) \$(patsubst %.l,%.c,\$(SEN_FLEX_FILES))
[c08f3b1]88
89.PHONY: distclean
90distclean: clean
91        \$(RM) \$(CONFIG_FILES)
92
93.PHONY: install
94install: all
95        echo TODO: make install
96       
97.PHONY: uninstall
98uninstall:
99        echo TODO: make uninstall
100
101%.o: %.c
102        \$(CC) -c \$< -o \$@ \$(ALL_CFLAGS)
103
[12743b9]104%.c: %.l
[44f59b8]105        \$(FLEX) -t \$< > \$@
106
[12743b9]107%.c: %.ggo
[1e551bd]108        gengetopt --input $< --file-name \$(basename \$@) --conf-parser
[12743b9]109
110%.h: %.ggo
[1e551bd]111        gengetopt --input $< --file-name \$(basename \$@) --conf-parser
[12743b9]112
[c08f3b1]113%: %.o
114        \$(CC) \$? -o \$@ \$(ALL_LDFLAGS) \$(ALL_CFLAGS) \$(ALL_LDLIBS)
115
116tok: \$(TOK_OBJ_FILES)
117
118EOF
119
Note: See TracBrowser for help on using the repository browser.