Last change
on this file since 368 was 2, checked in by Rick van der Zwet, 15 years ago |
Initial import of data of old repository ('data') worth keeping (e.g. tracking
means of URL access statistics)
|
File size:
896 bytes
|
Rev | Line | |
---|
[2] | 1 | CC = gcc
|
---|
| 2 | LEX = flex
|
---|
| 3 | YACC = bison --yacc
|
---|
| 4 | SHELL = /bin/sh
|
---|
| 5 |
|
---|
| 6 | WARNINGS = -Wall -ansi
|
---|
| 7 | OTHERS = -g
|
---|
| 8 | DEFINES = -DDEBUG
|
---|
| 9 |
|
---|
| 10 | CFLAGS = $(WARNINGS) $(OTHERS) $(DEFINES)
|
---|
| 11 | LFLAGS =
|
---|
| 12 | YFLAGS = --defines --debug --verbose
|
---|
| 13 | LDFLAGS = -g
|
---|
| 14 | LOADLIBS = -lfl -lm
|
---|
| 15 |
|
---|
| 16 | IMPORTANT = calc.[hly] \
|
---|
| 17 | Makefile
|
---|
| 18 |
|
---|
| 19 | all: calc
|
---|
| 20 |
|
---|
| 21 | # To be executed before the very first build
|
---|
| 22 | first: dirs
|
---|
| 23 |
|
---|
| 24 | # Dependency stuff
|
---|
| 25 | calc: gen/y.tab.o gen/lex.yy.o
|
---|
| 26 | $(CC) $(LDFLAGS) -o $@ $^ $(LOADLIBS)
|
---|
| 27 |
|
---|
| 28 | gen/y.tab.h gen/y.tab.c: calc.y
|
---|
| 29 | $(YACC) $(YFLAGS) $< -o gen/y.tab.c
|
---|
| 30 |
|
---|
| 31 | gen/lex.yy.c: calc.l
|
---|
| 32 | $(LEX) $(LFLAGS) -o$@ $<
|
---|
| 33 |
|
---|
| 34 | clean:
|
---|
| 35 | rm -f gen/{lex.yy.c,y.tab.*,y.output,*.o} calc \
|
---|
| 36 | `find . -name core -o -name \*\.bak`
|
---|
| 37 |
|
---|
| 38 | backup:
|
---|
| 39 | tar cfz ../CoCo-`date +'%y%m%d-%H%M'`.tar.gz $(IMPORTANT)
|
---|
| 40 |
|
---|
| 41 | dirs:
|
---|
| 42 | mkdir gen
|
---|
| 43 |
|
---|
| 44 | # Show dependencies between .c files
|
---|
| 45 | showdeps:
|
---|
| 46 | $(CC) -MM *.c
|
---|
| 47 |
|
---|
| 48 | # Dependency stuff
|
---|
| 49 | gen/lex.yy.o: gen/lex.yy.c gen/y.tab.h
|
---|
| 50 | gen/y.tab.o: gen/y.tab.c
|
---|
Note:
See
TracBrowser
for help on using the repository browser.