jdisa/Makefile
author Markus Bröker <mbroeker@largo.dyndns.tv>
Sun, 19 Jul 2009 19:44:48 +0200
changeset 101 176448af80fa
parent 95 d2a071bd1a60
permissions -rw-r--r--
Ignore files from the javadb project Do not nerve with class- and derby files committer: Markus Bröker <mbroeker@largo.homelinux.org>
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
95
d2a071bd1a60 java disassembler
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
     1
      CC = gcc
d2a071bd1a60 java disassembler
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
     2
      LD = ld
d2a071bd1a60 java disassembler
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
     3
    YACC = bison -y
d2a071bd1a60 java disassembler
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
     4
    FLEX = flex
d2a071bd1a60 java disassembler
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
     5
   JAVAC = javac
d2a071bd1a60 java disassembler
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
     6
  CFLAGS = -Wall -Werror -O2 -ansi
d2a071bd1a60 java disassembler
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
     7
 LDFLAGS =
d2a071bd1a60 java disassembler
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
     8
d2a071bd1a60 java disassembler
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
     9
 INCLUDE = -Iinclude
d2a071bd1a60 java disassembler
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    10
TARGET = jdisa
d2a071bd1a60 java disassembler
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    11
OBJECTS  = main.o
d2a071bd1a60 java disassembler
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    12
d2a071bd1a60 java disassembler
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    13
.SUFFIXES: .c .y .l
d2a071bd1a60 java disassembler
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    14
d2a071bd1a60 java disassembler
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    15
.c.o:
d2a071bd1a60 java disassembler
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    16
	$(CC) -c $(CFLAGS) $(INCLUDE) $(CONFIG) $<
d2a071bd1a60 java disassembler
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    17
d2a071bd1a60 java disassembler
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    18
.y.c:
d2a071bd1a60 java disassembler
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    19
	$(YACC) -d $< -o $@
d2a071bd1a60 java disassembler
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    20
d2a071bd1a60 java disassembler
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    21
.l.c:
d2a071bd1a60 java disassembler
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    22
	$(FLEX) -o $@ $<
d2a071bd1a60 java disassembler
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    23
d2a071bd1a60 java disassembler
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    24
all: $(TARGET)
d2a071bd1a60 java disassembler
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    25
d2a071bd1a60 java disassembler
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    26
d2a071bd1a60 java disassembler
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    27
$(TARGET): $(OBJECTS)
d2a071bd1a60 java disassembler
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    28
	$(CC) $(CFLAGS) $(LDFLAGS) $(OBJECTS) -o $@
d2a071bd1a60 java disassembler
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    29
d2a071bd1a60 java disassembler
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    30
tests/Test.class: tests/Test.java
d2a071bd1a60 java disassembler
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    31
	$(JAVAC) -g:none -d tests/ $<
d2a071bd1a60 java disassembler
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    32
d2a071bd1a60 java disassembler
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    33
debug: $(TARGET) tests/Test.class
d2a071bd1a60 java disassembler
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    34
	./jdisa tests/Test.class
d2a071bd1a60 java disassembler
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    35
d2a071bd1a60 java disassembler
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    36
.PHONY: beauty clean distclean
d2a071bd1a60 java disassembler
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    37
d2a071bd1a60 java disassembler
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    38
clean:
d2a071bd1a60 java disassembler
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    39
	rm -f *.[oae];
d2a071bd1a60 java disassembler
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    40
	rm -f *~;
d2a071bd1a60 java disassembler
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    41
d2a071bd1a60 java disassembler
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    42
distclean: beauty
d2a071bd1a60 java disassembler
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    43
	make clean
d2a071bd1a60 java disassembler
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    44
	rm -f $(TARGET)
d2a071bd1a60 java disassembler
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    45
	rm -f tests/Test.class
d2a071bd1a60 java disassembler
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    46
d2a071bd1a60 java disassembler
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    47
beauty:
d2a071bd1a60 java disassembler
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    48
	@indent *.c
d2a071bd1a60 java disassembler
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    49
	@eraser *.c