# Makefile for decomp - a decompiler # # Copyright (C) 2001 Jonathan duSaint SHELL = /bin/bash CC = gcc CFLAGS = -g -Wall -O2 CORESOURCE = decomp.c data.c code.c fileinfo.c symtab.c memory.c hash.c error.c FILESOURCE = elf.c dos.c ARCHSOURCE = ia32.c alpha.c SOURCES = $(CORESOURCE) $(FILESOURCE) $(ARCHSOURCE) EXE = decomp DOCSOURCE = decomp.texinfo TEXI2DVI = texi2dvi DVIPS = dvips TEXI2HTML = texi2html -monolithic DOCEXTRAS = *.aux *.cp *.dvi *.fn *.ky *.log *.pg *.toc *.tp *.vr *.ps MEMTESTFILES = memtest.c memory.c error.c HASHTESTFILES = hashtest.c hash.c error.c .PHONY : all dist clean doc ps info html install installdoc help test all : $(EXE) dist : clean (cd ..; tar -c decomp | gzip -c > decomp-0.0.tar.gz) help : @echo Valid targets are @echo - all: make the executable file @echo - install: install the executable file @echo - clean: remove any generated files @echo - doc: create all of the documentation @echo - ps: create the Postscript documentation @echo - html: create the HTML documentation @echo - info: create the Texinfo documentation @echo - installdoc: install the HTML and Texinfo documentation @echo - help: print this message @echo - test: run the testsuite $(EXE) : $(SOURCES:.c=.o) doc : ps info html ps : $(DOCSOURCE:.texinfo=.ps) $(DOCSOURCE:.texinfo=.ps) : $(DOCSOURCE:.texinfo=.dvi) $(DVIPS) -o $@ $< $(DOCSOURCE:.texinfo=.dvi) : $(DOCSOURCE) $(TEXI2DVI) $< info : $(DOCSOURCE:.texinfo=.info) $(DOCSOURCE:.texinfo=.info) : $(DOCSOURCE) $(MAKEINFO) $< html : $(DOCSOURCE:.texinfo=.html) $(DOCSOURCE:.texinfo=.html) : $(DOCSOURCE) $(TEXI2HTML) $< install : $(EXE) @echo Not much here yet... installdoc : info html @echo Not much here yet... clean : rm -f *.o *~ $(EXE) memtest hashtest *.info *.html $(DOCEXTRAS) test : touch test/.runtest make -C test memtest : $(MEMTESTFILES:.c=.o) hashtest : LDFLAGS = -lreadline -lhistory -ltermcap hashtest : $(HASHTESTFILES:.c=.o)