jdisa/Makefile
author Markus Bröker <mbroeker@largo.dyndns.tv>
Thu, 28 May 2009 16:51:26 +0200
changeset 95 d2a071bd1a60
permissions -rw-r--r--
java disassembler jdisa disassembles a given java class file and shows the bytecode instructions. it does not currently output the same as javap -c <file>... committer: Markus Bröker <mbroeker@largo.homelinux.org>

      CC = gcc
      LD = ld
    YACC = bison -y
    FLEX = flex
   JAVAC = javac
  CFLAGS = -Wall -Werror -O2 -ansi
 LDFLAGS =

 INCLUDE = -Iinclude
TARGET = jdisa
OBJECTS  = main.o

.SUFFIXES: .c .y .l

.c.o:
	$(CC) -c $(CFLAGS) $(INCLUDE) $(CONFIG) $<

.y.c:
	$(YACC) -d $< -o $@

.l.c:
	$(FLEX) -o $@ $<

all: $(TARGET)


$(TARGET): $(OBJECTS)
	$(CC) $(CFLAGS) $(LDFLAGS) $(OBJECTS) -o $@

tests/Test.class: tests/Test.java
	$(JAVAC) -g:none -d tests/ $<

debug: $(TARGET) tests/Test.class
	./jdisa tests/Test.class

.PHONY: beauty clean distclean

clean:
	rm -f *.[oae];
	rm -f *~;

distclean: beauty
	make clean
	rm -f $(TARGET)
	rm -f tests/Test.class

beauty:
	@indent *.c
	@eraser *.c