Makefile 1018 Bytes
Newer Older
1 2 3 4 5 6 7
# destination: home dir..
# DEST  =       $(HOME)
# or can install into TOOLDIR (env var, eg ~/c-tools)
DEST    =       $(TOOLDIR)
# or can install systemwide, with optional $(PREFIX) support for packaging
# DEST            =	$(PREFIX)/usr
#
8
BINDIR		=	$(DEST)/bin
9
ARCHDIR         =	$(BINDIR)/$(ARCH)
10
MANDIR		=	$(DEST)/man/man1
11 12
CC		=	gcc
#CC		=	cc
13
CFLAGS		=	-g -UDEBUGGING -Wall
14
LDLIBS		=	
15
EXECS		=	datadec
ees1dw's avatar
ees1dw committed
16

17 18
datadec_srcs	=	datadec.c parser.c lexer.c struct.c decs.c optimize.c
datadec_objs	=	datadec.o parser.o lexer.o struct.o decs.o optimize.o
ees1dw's avatar
ees1dw committed
19 20 21 22


all:	$(EXECS)

23 24 25
install:	$(EXECS)
	install -m 755 $(EXECS) $(BINDIR)
	install -m 644 c-datadec.man $(MANDIR)/datadec.1
ees1dw's avatar
ees1dw committed
26 27 28

clean:
	/bin/rm -f *.o a.out core $(EXECS)
29
	cd test; make clean
ees1dw's avatar
ees1dw committed
30 31

datadec:	$(datadec_objs)
dcw's avatar
cc=gcc  
dcw committed
32
	$(CC) -g -o datadec $(datadec_objs)
ees1dw's avatar
ees1dw committed
33

34 35 36 37 38 39
datadec.o:      struct.h lexer.h parser.h decs.h optimize.h
decs.o:         struct.h decs.h
lexer.o:        struct.h lexer.h
optimize.o:	optimize.h struct.h
parser.o:       struct.h lexer.h parser.h
struct.o:       struct.h