summaryrefslogtreecommitdiff
path: root/imdi/Makefile
blob: 5523893eea152c83e1b3292fbd21e02fc73714fd (plain)
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
61
62
63
64
65
66

# Boilerplate Makefile for compiling imdi

# Copyright 2000 - 2007 Graeme W. Gill
# This material is licenced under the GNU AFFERO GENERAL PUBLIC LICENSE Version 3 :-
# see the License.txt file for licencing details.

# "include" the right environment for your system,
# by uncommenting the appropriate line:

# Microsoft VC++, WinNT setup
include Makefile.WNT

# Generic UNIX setup
#include Makefile.UNIX

# Apple OS X
#include Makefile.OSX


###############################

#Set optimisation on
CCFLAGS = $(CCFLAGSDEF) $(CCOPTFLAG) $(CCDEFINES) $(BCONFIG)

#Set debugging on
#CCFLAGS = $(CCFLAGSDEF) $(CCDEBUGFLAG) $(CCDEFINES) $(BCONFIG)
# debugging #define
#CCFLAGS = $(CCFLAGSDEF) $(CCDEBUGFLAG) $(CCDEFINES) $(DEFFLAG)DEBUG
LINKFLAGS = $(LINKFLAGSDEF) $(LINKDEBUGFLAG)

STDHDRS = $(INCFLAG)$(STDHDRSDEF)

all:: libimdi$(SUFLIB)

# Used by both code generator and runtime
imdi_make$(SUFEXE): imdi_make$(SUFOBJ) imdi_gen$(SUFOBJ) cgen$(SUFOBJ)
	$(LINK) $(LINKOF)imdi_make$(SUFEXE) imdi_make$(SUFOBJ) imdi_gen$(SUFOBJ) cgen$(SUFOBJ)


# The code generator program

cgen$(SUFOBJ): cgen.c imdi_utl.h imdi_arch.h imdi_gen.h imdi_tab.h
	$(CC) cgen.c

imdi_gen$(SUFOBJ): imdi_gen.c imdi_utl.h imdi_arch.h imdi_gen.h
	$(CC) imdi_gen.c

# Generate the kernel files
imdi_k.h imdi_k.c : imdi_make$(SUFEXE)
	.$(SLASH)imdi_make$(SUFEXE) 


# imdi runtime library

imdi$(SUFOBJ): imdi.c imdi.h imdi_tab.h imdi_k.h imdi_k.c
	$(CC) imdi.c

libimdi$(SUFLIB): imdi$(SUFOBJ) imdi_tab$(SUFOBJ)
	$(LIBU) $(LIBOF)$@ imdi$(SUFOBJ) imdi_tab$(SUFOBJ)
	$(RANLIB) libimdi$(SUFLIB)