File: Makefile

package info (click to toggle)
kforth 20010227-2
  • links: PTS
  • area: main
  • in suites: woody
  • size: 508 kB
  • ctags: 652
  • sloc: asm: 2,026; cpp: 1,795; ansic: 575; makefile: 64
file content (60 lines) | stat: -rw-r--r-- 1,390 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#
# Makefile for kForth
#
# Copyright (c) 1998--2000 Creative Consulting for Research and Education
# Provided under the terms of the GNU General Public License
#
# Last Revised: 8-8-2000
#
# Possible invocations:
#
#	make		creates dynamically linked release executable
#	make clean	remove all object files belonging to this project
#	make debug	create statically linked debug executable
#	make archive	create a compressed tar file
#
# Notes:
#
#   1. If a debug version is being built, always invoke "make clean" 
#      before "make debug".
#
#
# Default debug option creates a release version of the executable.
# Invoke "make debug" if you want to create an executable
# that contains debugging information for the GNU debugger (gdb).

DEBUG = 

CPP = g++ -c
OBJS = kforth.o ForthVM.o ForthCompiler.o vm.o vmc.o
LIBS = -lreadline -lncurses

kforth: ${OBJS} 
	g++ -o kforth ${DEBUG} ${OBJS} ${LIBS}

clean:
	- rm -f ${OBJS} kforth

archive:
	tar -zcvf kflnx10.tar.gz *.s *.h *.c *.cpp *.4th *.xpm Makefile README

debug:
	make kforth "DEBUG = -g"

kforth.o: kforth.cpp ForthVM.h ForthCompiler.h
	${CPP} ${DEBUG} kforth.cpp

ForthVM.o: ForthVM.cpp ForthVM.h fbc.h ForthCompiler.h
	${CPP} ${DEBUG} ForthVM.cpp

ForthCompiler.o: ForthCompiler.cpp ForthCompiler.h fbc.h
	${CPP} ${DEBUG} ForthCompiler.cpp

vm.o: vm.s
	as -o vm.o vm.s

vmc.o: vmc.c
	gcc -c ${DEBUG} vmc.c

# end of makefile