File: makefile

package info (click to toggle)
ghc-cvs 20040725-2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 68,484 kB
  • ctags: 19,658
  • sloc: haskell: 251,945; ansic: 109,709; asm: 24,961; sh: 12,825; perl: 5,786; makefile: 5,334; xml: 3,884; python: 682; yacc: 650; lisp: 477; cpp: 337; ml: 76; fortran: 24; csh: 18
file content (64 lines) | stat: -rw-r--r-- 2,116 bytes parent folder | download | duplicates (3)
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
# -----------------------------------------------------------------------------=
#
# (c) The GHC Team 1997-2000
#

TOP = ..
include $(TOP)/mk/boilerplate.mk

PACKAGE = objectio
PACKAGE_DEPS = base

ALL_DIRS = 	Graphics/UI \
		Graphics/UI/ObjectIO \
		Graphics/UI/ObjectIO/Device \
		Graphics/UI/ObjectIO/Control \
		Graphics/UI/ObjectIO/Menu \
		Graphics/UI/ObjectIO/Process \
		Graphics/UI/ObjectIO/Receiver \
		Graphics/UI/ObjectIO/Timer \
		Graphics/UI/ObjectIO/Window \
		Graphics/UI/ObjectIO/OS

ifeq "$(TARGETPLATFORM)" "i386-unknown-mingw32"
PLAT_DIR=Windows
else
PLAT_DIR=Linux
CC_OPTS = -fnative-struct
endif

SRC_HC_OPTS += -fglasgow-exts -Iinclude
SRC_CC_OPTS += -Iinclude -I$(GHC_INCLUDE_DIR)
C_OBJS += $(patsubst %.c, %.o, $(wildcard  cbits/$(PLAT_DIR)/*.c))


STUBOBJS = $(C_OBJS)

#-----------------------------------------------------------------------------
# 	Building the library for GHCi
#
# The procedure differs from that in fptools/mk/target.mk in one way:
#  (*) on Win32 we must split it into four, because a single .o file can't
#      have more than 65536 relocations in it.

ifeq "$(TARGETPLATFORM)" "i386-unknown-mingw32"

# Turn off standard rule which creates HSobjectio.o from LIBOBJS.
DONT_WANT_STD_GHCI_LIB_RULE=YES

GHCI_LIBOBJS = $(HS_OBJS) $(C_OBJS)

INSTALL_LIBS += HSobjectio1.o HSobjectio2.o HSobjectio3.o HSobjectio4.o

endif # TARGETPLATFORM = i386-unknown-mingw32

# -----------------------------------------------------------------------------

include $(TOP)/mk/target.mk

HSobjectio.o : $(C_OBJS) $(GHCI_LIBOBJS)
	ld -r -x -o HSobjectio1.o $(filter Graphics/UI/ObjectIO/Std%.o,$^)
	ld -r -x -o HSobjectio2.o $(filter-out cbits/$(PLAT_DIR)/%.o, $(filter-out Graphics/UI/ObjectIO.o, $(filter-out Graphics/UI/ObjectIO/Std%.o,$(filter-out Graphics/UI/ObjectIO/OS/%.o,$^))))
	ld -r -x -o HSobjectio3.o Graphics/UI/ObjectIO.o # $(filter-out Graphics/UI/ObjectIO/Std%.o,$(filter-out Graphics/UI/ObjectIO/%Device.o,$(filter Graphics/UI/ObjectIO/%.o,$^)))
	ld -r -x -o HSobjectio4.o $(filter cbits/$(PLAT_DIR)/%.o,$^) $(filter Graphics/UI/ObjectIO/OS/%.o,$^)
	touch HSobjectio.o