95
|
1 |
CC = gcc
|
|
2 |
LD = ld
|
|
3 |
YACC = bison -y
|
|
4 |
FLEX = flex
|
|
5 |
JAVAC = javac
|
|
6 |
CFLAGS = -Wall -Werror -O2 -ansi
|
|
7 |
LDFLAGS =
|
|
8 |
|
|
9 |
INCLUDE = -Iinclude
|
|
10 |
TARGET = jdisa
|
|
11 |
OBJECTS = main.o
|
|
12 |
|
|
13 |
.SUFFIXES: .c .y .l
|
|
14 |
|
|
15 |
.c.o:
|
|
16 |
$(CC) -c $(CFLAGS) $(INCLUDE) $(CONFIG) $<
|
|
17 |
|
|
18 |
.y.c:
|
|
19 |
$(YACC) -d $< -o $@
|
|
20 |
|
|
21 |
.l.c:
|
|
22 |
$(FLEX) -o $@ $<
|
|
23 |
|
|
24 |
all: $(TARGET)
|
|
25 |
|
|
26 |
|
|
27 |
$(TARGET): $(OBJECTS)
|
|
28 |
$(CC) $(CFLAGS) $(LDFLAGS) $(OBJECTS) -o $@
|
|
29 |
|
|
30 |
tests/Test.class: tests/Test.java
|
|
31 |
$(JAVAC) -g:none -d tests/ $<
|
|
32 |
|
|
33 |
debug: $(TARGET) tests/Test.class
|
|
34 |
./jdisa tests/Test.class
|
|
35 |
|
|
36 |
.PHONY: beauty clean distclean
|
|
37 |
|
|
38 |
clean:
|
|
39 |
rm -f *.[oae];
|
|
40 |
rm -f *~;
|
|
41 |
|
|
42 |
distclean: beauty
|
|
43 |
make clean
|
|
44 |
rm -f $(TARGET)
|
|
45 |
rm -f tests/Test.class
|
|
46 |
|
|
47 |
beauty:
|
|
48 |
@indent *.c
|
|
49 |
@eraser *.c
|