File: Makefile.inc

package info (click to toggle)
hat 2.02-12
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 8,296 kB
  • ctags: 668
  • sloc: haskell: 64,394; ansic: 6,112; sh: 888; makefile: 451
file content (121 lines) | stat: -rw-r--r-- 2,156 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
### Configurable variables:

OPT = -O3

# CC = actually sourced from LIBDIR/MACHINE/config
INSTALL = cp
AR = ar
LD = ld


VERSION = 1.16
# When incrementing the nhc98 version number, don't forget to change the
# corresponding version in the configure script!
#   (odd minor number = CVS version;  even minor number = release version)

HMAKEVERSION = 3.07
# HMAKEVERSION is the separate version number for hmake.
#   (odd/even minor number is irrelevant - all are release versions)

HATVERSION = 2.02
# HATVERSION is the separate version number for hat.
#   (odd minor number = CVS version;  even minor number = release version)


### End of configurable variables

ifeq "" "${MKDIR}"
MKDIR:=$(shell pwd)
#MKDIR:=$(PWD)
endif

TOPDIR := $(MKDIR)
MACHINE = $(shell $(TOPDIR)/script/harch)
export MACHINE

CYG = $(findstring CYGWIN, $(MACHINE))
ifeq "CYGWIN" "${CYG}"
  TOPDIR := $(shell cygpath -w $(TOPDIR) | tr '\\\\' '/' )
endif


OBJ=obj$(CFG)
INCDIR=$(TOPDIR)/include
SRCDIR=$(TOPDIR)/src
LIBDIR=$(TOPDIR)/lib
DST=$(LIBDIR)/$(MACHINE)

### This is a very important step: get the local configuration
include $(DST)/config
###

ifeq "" "${BUILDBASEDIR}"
BUILDBASEDIR:=/tmp
endif
# ifeq "CYGWIN" "${CYG}"
#   BUILDDIR = $(shell echo `cygpath -w $(BUILDBASEDIR)/$(MACHINE)` | tr '\\' '/')
# else
BUILDDIR = $(BUILDBASEDIR)/$(MACHINE)
# endif

LOCAL = $(TOPDIR)/script/
export LOCAL
HC = $(LOCAL)nhc98
export HC
HMAKE = $(LOCAL)hmake
export HMAKE

BUILDCOMP := $(shell basename $(BUILDWITH) | cut -c1-3 )
CPP = $(CC) -E -x c

DCFG:=
TRACING=$(findstring T,${CFG})
PROFILING=$(findstring p,${CFG})
TPROF=$(findstring z,${CFG})

ifeq "T" "${TRACING}"
DCFG:=${DCFG} -DTRACE=1 -DDBGTRANS
endif

ifeq "p" "${PROFILING}"
DCFG:=${DCFG} -DPROFILE=2
endif

ifeq "z" "${TPROF}"
DCFG:=${DCFG} -DTPROF
endif

ifeq "1" "${USINGRTS}"
NHEAP = +RTS -H8M -RTS
endif


ifeq "T" "${TRACING}"
  HISUFFIX=T.hi
  O=T.o
  C=T.c
else
ifeq "p" "${PROFILING}"
  HISUFFIX=hi
  O=p.o
  C=p.c
else
ifeq "z" "${TPROF}"
  HISUFFIX=hi
  O=z.o
  C=z.c
else
  HISUFFIX=hi
  O=o
  C=hc
endif
endif
endif

ifeq "T" "${TRACING}"
ifeq "z" "${TPROF}"
  HISUFFIX=T.hi
  O=Tz.o
  C=Tz.c
endif
endif