projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[project @ 2001-03-23 16:36:20 by simonmar]
[ghc-hetmet.git]
/
mk
/
target.mk
diff --git
a/mk/target.mk
b/mk/target.mk
index
56d1193
..
81ac73b
100644
(file)
--- a/
mk/target.mk
+++ b/
mk/target.mk
@@
-297,41
+297,60
@@
$(HS_PROG) :: $(HS_OBJS)
$(HC) -o $@ $(HC_OPTS) $(LD_OPTS) $(HS_OBJS) $(LIBS)
endif
$(HC) -o $@ $(HC_OPTS) $(LD_OPTS) $(HS_OBJS) $(LIBS)
endif
+# Object and interface files have suffixes tagged with their ways
+ifneq "$(way)" ""
+SRC_HC_OPTS += -hisuf $(way_)hi
+endif
+
#----------------------------------------
# C programs
ifneq "$(C_PROG)" ""
all :: $(C_PROG)
#----------------------------------------
# C programs
ifneq "$(C_PROG)" ""
all :: $(C_PROG)
+ifeq "$(TARGETPLATFORM)" "i386-unknown-mingw32"
+CC_OPTS += -mno-cygwin
+endif
+
$(C_PROG) :: $(C_OBJS)
$(CC) -o $@ $(CC_OPTS) $(LD_OPTS) $(C_OBJS) $(LIBS)
endif
#----------------------------------------
$(C_PROG) :: $(C_OBJS)
$(CC) -o $@ $(CC_OPTS) $(LD_OPTS) $(C_OBJS) $(LIBS)
endif
#----------------------------------------
-# Libraries/archives
+# Building HsLibs libraries.
+
+ifneq "$(HSLIB)" ""
ifeq "$(IS_CBITS_LIB)" "YES"
_cbits := _cbits
endif
ifeq "$(IS_CBITS_LIB)" "YES"
_cbits := _cbits
endif
-ifneq "$(HSLIB)" ""
LIBRARY = libHS$(HSLIB)$(_cbits)$(_way).a
GHCI_LIBRARY = HS$(HSLIB)$(_cbits)$(_way).o
LIBRARY = libHS$(HSLIB)$(_cbits)$(_way).a
GHCI_LIBRARY = HS$(HSLIB)$(_cbits)$(_way).o
+
+ifneq "$(IS_CBITS_LIB)" "YES"
+WAYS=$(GhcLibWays)
+endif
+
ifeq "$(LIBOBJS)" ""
ifeq "$(LIBOBJS)" ""
- ifneq "$(IS_CBITS_LIB)" "YES"
- LIBOBJS = $(HS_OBJS)
- else
+ ifeq "$(IS_CBITS_LIB)" "YES"
LIBOBJS = $(C_OBJS)
LIBOBJS = $(C_OBJS)
+ else
+ LIBOBJS = $(HS_OBJS)
endif
endif
endif
endif
-ifneq "$(IS_CBITS_LIB)" ""
-CC = $(HC)
+
+ifeq "$(IS_CBITS_LIB)" "YES"
override datadir:=$(libdir)/includes
INSTALL_DATAS += Hs$(shell perl -e 'print ucfirst "$(HSLIB)"').h
SRC_CC_OPTS += -I$(GHC_INCLUDE_DIR) -I$(GHC_RUNTIME_DIR)
endif
override datadir:=$(libdir)/includes
INSTALL_DATAS += Hs$(shell perl -e 'print ucfirst "$(HSLIB)"').h
SRC_CC_OPTS += -I$(GHC_INCLUDE_DIR) -I$(GHC_RUNTIME_DIR)
endif
-endif
+
+endif # HSLIB
+
+#----------------------------------------
+# Libraries/archives
ifneq "$(LIBRARY)" ""
all :: $(LIBRARY)
ifneq "$(LIBRARY)" ""
all :: $(LIBRARY)
@@
-417,6
+436,7
@@
endif
#
ifneq "$(GHCI_LIBRARY)" ""
#
ifneq "$(GHCI_LIBRARY)" ""
+ifeq "$(way)" ""
ifeq "$(GhcWithInterpreter)" "YES"
all :: $(GHCI_LIBRARY)
ifeq "$(GhcWithInterpreter)" "YES"
all :: $(GHCI_LIBRARY)
@@
-432,6
+452,7
@@
INSTALL_LIBS += $(GHCI_LIBRARY)
CLEAN_FILES += $(GHCI_LIBRARY)
endif
endif
CLEAN_FILES += $(GHCI_LIBRARY)
endif
endif
+endif
#----------------------------------------
# Building Win32 DLLs
#----------------------------------------
# Building Win32 DLLs
@@
-605,12
+626,6
@@
endif
all :: $(SCRIPT_PROG)
all :: $(SCRIPT_PROG)
-#
-# #! support under cygwin32 is not quite there yet,
-# so we rely on the eval `trick' instead. On all other
-# platforms, we prepend #!$(INTERP) -- SOF 6/97
-#
-
$(SCRIPT_PROG) : $(SCRIPT_OBJS)
$(RM) $@
@echo Creating $@...
$(SCRIPT_PROG) : $(SCRIPT_OBJS)
$(RM) $@
@echo Creating $@...
@@
-748,11
+763,8
@@
ifneq "$(LIBRARY)" ""
INSTALL_LIBS += $(LIBRARY)
ifeq "$(DLLized)" "YES"
INSTALL_PROGS += $(DLL_NAME)
INSTALL_LIBS += $(LIBRARY)
ifeq "$(DLLized)" "YES"
INSTALL_PROGS += $(DLL_NAME)
-else
-ifeq "$(DLLized)" "YES"
INSTALL_LIBS += $(patsubst %.a,%_imp.a, $(LIBRARY))
endif
INSTALL_LIBS += $(patsubst %.a,%_imp.a, $(LIBRARY))
endif
-endif
INSTALL_DATAS += $(HS_IFACES)
endif
INSTALL_DATAS += $(HS_IFACES)
endif