view Makefile @ 16:a2a81589380d default tip

Reformat the whole source via clang-format for better consistency.
author Matti Hamalainen <ccr@tnsp.org>
date Thu, 14 Oct 2021 01:53:20 +0300
parents 84c0facfc43c
children
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.4++

# 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