Mercurial > hg > forks > dxa
view Makefile @ 5:b91c47026822
Make version information a compile-time define.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Wed, 25 Feb 2015 04:19:28 +0200 |
parents | a07eb3757bf0 |
children | cfa260872b23 |
line wrap: on
line source
# dxa makefile # marko's originally, hacked up by cameron TARGETS = dxa OBJECTS = scan.o vector.o dump.o table.o label.o main.o DXA_VERSION = 0.1.3++2 # choose the compiler and flags CC = gcc CFLAGS = -g -O2 -W -Wall -DDXA_VERSION="\"$(DXA_VERSION)\"" INSTALL = install PREFIX = /usr/local #CC = cc #CFLAGS = -O #CFLAGS = -O2 all: $(TARGETS) dxa : $(OBJECTS) $(CC) $(LDFLAGS) -o $@ $(OBJECTS) scan.o : structures.h proto.h options.h opcodes.h vector.o : structures.h proto.h options.h dump.o : structures.h proto.h options.h opcodes.h table.o : structures.h proto.h label.o : structures.h proto.h main.o : structures.h proto.h options.h opcodes.h clean: rm -f $(OBJECTS) $(TARGETS) core dist: clean cd .. && tar cvf $dxa-$(DXA_VERSION).tar dxa-$(DXA_VERSION) && xz -9 dxa-$(DXA_VERSION).tar install: all @for fn in $(TARGETS); do echo " INSTALL $$fn $(PREFIX)/bin/"; $(INSTALL) -m 755 "$$fn" $(PREFIX)/bin/; done