parser/calc/Makefile
author Markus Bröker <mbroeker@largo.dyndns.tv>
Tue, 19 May 2009 02:58:59 +0200
changeset 93 66b3596f71b6
parent 66 2b4f786d9073
permissions -rw-r--r--
make cross_getch invisible the cross_getch function will be called from the JNI Wrapper and must not be visible to others committer: Markus Bröker <mbroeker@largo.homelinux.org>
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
66
2b4f786d9073 Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 39
diff changeset
     1
      CC = gcc
2b4f786d9073 Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 39
diff changeset
     2
      LD = ld
2b4f786d9073 Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 39
diff changeset
     3
    YACC = bison -y
2b4f786d9073 Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 39
diff changeset
     4
    FLEX = flex
2b4f786d9073 Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 39
diff changeset
     5
  CFLAGS = -Wall -O2 -ansi -D_XOPEN_SOURCE=500
2b4f786d9073 Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 39
diff changeset
     6
 LDFLAGS =
2b4f786d9073 Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 39
diff changeset
     7
 INCLUDE = -Iinclude
2b4f786d9073 Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 39
diff changeset
     8
2b4f786d9073 Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 39
diff changeset
     9
OBJECTS  = main.o
2b4f786d9073 Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 39
diff changeset
    10
OBJECTS += parser.o
2b4f786d9073 Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 39
diff changeset
    11
OBJECTS += lexer.o
2b4f786d9073 Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 39
diff changeset
    12
2b4f786d9073 Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 39
diff changeset
    13
TARGET = calc
37
0fbbe329c3a2 demos/parser
Markus Bröker <mbroeker@largo.localnet>
parents:
diff changeset
    14
38
48f6f3918b82 Project Split finished
Markus Bröker <mbroeker@largo.localnet>
parents: 37
diff changeset
    15
.SUFFIXES: .c .y .l
37
0fbbe329c3a2 demos/parser
Markus Bröker <mbroeker@largo.localnet>
parents:
diff changeset
    16
39
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 38
diff changeset
    17
.c.o:
66
2b4f786d9073 Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 39
diff changeset
    18
	$(CC) -c $(CFLAGS) $(INCLUDE) $(CONFIG) $<
37
0fbbe329c3a2 demos/parser
Markus Bröker <mbroeker@largo.localnet>
parents:
diff changeset
    19
38
48f6f3918b82 Project Split finished
Markus Bröker <mbroeker@largo.localnet>
parents: 37
diff changeset
    20
.y.c:
37
0fbbe329c3a2 demos/parser
Markus Bröker <mbroeker@largo.localnet>
parents:
diff changeset
    21
	$(YACC) -d $< -o $@
0fbbe329c3a2 demos/parser
Markus Bröker <mbroeker@largo.localnet>
parents:
diff changeset
    22
38
48f6f3918b82 Project Split finished
Markus Bröker <mbroeker@largo.localnet>
parents: 37
diff changeset
    23
.l.c:
37
0fbbe329c3a2 demos/parser
Markus Bröker <mbroeker@largo.localnet>
parents:
diff changeset
    24
	$(FLEX) -o $@ $<
0fbbe329c3a2 demos/parser
Markus Bröker <mbroeker@largo.localnet>
parents:
diff changeset
    25
0fbbe329c3a2 demos/parser
Markus Bröker <mbroeker@largo.localnet>
parents:
diff changeset
    26
all: $(TARGET)
0fbbe329c3a2 demos/parser
Markus Bröker <mbroeker@largo.localnet>
parents:
diff changeset
    27
0fbbe329c3a2 demos/parser
Markus Bröker <mbroeker@largo.localnet>
parents:
diff changeset
    28
0fbbe329c3a2 demos/parser
Markus Bröker <mbroeker@largo.localnet>
parents:
diff changeset
    29
$(TARGET): $(OBJECTS)
0fbbe329c3a2 demos/parser
Markus Bröker <mbroeker@largo.localnet>
parents:
diff changeset
    30
	$(CC) $(CFLAGS) $(LDFLAGS) $(OBJECTS) -o $@
0fbbe329c3a2 demos/parser
Markus Bröker <mbroeker@largo.localnet>
parents:
diff changeset
    31
0fbbe329c3a2 demos/parser
Markus Bröker <mbroeker@largo.localnet>
parents:
diff changeset
    32
.PHONY: distclean clean
0fbbe329c3a2 demos/parser
Markus Bröker <mbroeker@largo.localnet>
parents:
diff changeset
    33
0fbbe329c3a2 demos/parser
Markus Bröker <mbroeker@largo.localnet>
parents:
diff changeset
    34
clean:
0fbbe329c3a2 demos/parser
Markus Bröker <mbroeker@largo.localnet>
parents:
diff changeset
    35
	rm -f *.[oae];
0fbbe329c3a2 demos/parser
Markus Bröker <mbroeker@largo.localnet>
parents:
diff changeset
    36
	rm -f *~;
38
48f6f3918b82 Project Split finished
Markus Bröker <mbroeker@largo.localnet>
parents: 37
diff changeset
    37
	rm -f parser.h
37
0fbbe329c3a2 demos/parser
Markus Bröker <mbroeker@largo.localnet>
parents:
diff changeset
    38
0fbbe329c3a2 demos/parser
Markus Bröker <mbroeker@largo.localnet>
parents:
diff changeset
    39
distclean:
0fbbe329c3a2 demos/parser
Markus Bröker <mbroeker@largo.localnet>
parents:
diff changeset
    40
	make clean
0fbbe329c3a2 demos/parser
Markus Bröker <mbroeker@largo.localnet>
parents:
diff changeset
    41
	rm -f $(TARGET)