include Makefile.inc
THISLIB = FFI
SEARCH = -P../IOExtras -P$(LOW) -P../PreludeIO -P../$(MACHINE)
ifeq "$(BUILDCOMP)" "hbc"
EXTRA_H_FLAGS = +RTS -A16M -H32M -RTS
endif
ifeq "${BUILDCOMP}" "ghc"
EXTRA_H_FLAGS = +RTS -K4M -RTS
endif
ifeq "${BUILDCOMP}" "nhc"
EXTRA_H_FLAGS = +RTS -H32M -RTS
endif
EXTRA_C_FLAGS =
SRCS = \
Addr.hs Ptr.hs FunPtr.hs Storable.hs \
ForeignObj.hs ForeignPtr.hs Int.hs Word.hs \
CError.hs CTypes.hs CTypesExtra.hs CStrings.hs \
MarshalAlloc.hs MarshalArray.hs MarshalError.hs MarshalUtils.hs \
StablePtr.hs
# Here are the main rules.
include ../Makefile.common
# Here are some extra rules.
Int.hs: Int.hs.cpp
$(CC) -E $< >$@
Word.hs: Word.hs.cpp
$(CC) -E $< >$@
# Here are the dependencies.
# dependencies generated by hmake -Md: (and hacked by MW)
${OBJDIR}/MarshalError.$O: ${OBJDIR}/Ptr.$O
${OBJDIR}/MarshalUtils.$O: ${OBJDIR}/Ptr.$O ${OBJDIR}/Storable.$O \
${OBJDIR}/MarshalAlloc.$O ${OBJDIR}/CTypes.$O ${OBJDIR}/CTypesExtra.$O
${OBJDIR}/MarshalArray.$O: ${OBJDIR}/Ptr.$O ${OBJDIR}/Storable.$O \
${OBJDIR}/MarshalAlloc.$O ${OBJDIR}/MarshalUtils.$O
${OBJDIR}/CTypesExtra.$O: ${OBJDIR}/Int.$O ${OBJDIR}/Word.$O ${OBJDIR}/CTypes.$O
${OBJDIR}/CTypes.$O: ${OBJDIR}/Int.$O ${OBJDIR}/Word.$O ${OBJDIR}/Storable.$O \
${OBJDIR}/Ptr.$O
${OBJDIR}/CStrings.$O: ${OBJDIR}/MarshalArray.$O ${OBJDIR}/CTypes.$O \
${OBJDIR}/Ptr.$O ${OBJDIR}/Word.$O
${OBJDIR}/MarshalAlloc.$O: ${OBJDIR}/Ptr.$O ${OBJDIR}/Storable.$O \
${OBJDIR}/CError.$O ${OBJDIR}/CTypes.$O ${OBJDIR}/CTypesExtra.$O
${OBJDIR}/StablePtr.$O: ${OBJDIR}/Ptr.$O ${OBJDIR}/Storable.$O
${OBJDIR}/ForeignPtr.$O: ${OBJDIR}/ForeignObj.$O ${OBJDIR}/Ptr.$O
${OBJDIR}/Storable.$O: ${OBJDIR}/Int.$O ${OBJDIR}/Word.$O ${OBJDIR}/Ptr.$O
${OBJDIR}/FunPtr.$O: ${OBJDIR}/Addr.$O ${OBJDIR}/Ptr.$O ${OBJDIR}/Storable.$O
## Yucky .hi stuff to deal with mutual dependencies.
IOHIFILES = FixIO
IOHIS = $(patsubst %,../IOExtras/%.${HISUFFIX},${IOHIFILES})
${OBJ_MAIN}: ../IOExtras/FixIO.${HISUFFIX}
${CFILE_MAIN}: ../IOExtras/FixIO.${HISUFFIX}
${IOHIS}: ../IOExtras/%.${HISUFFIX} : ../IOExtras/%.hs
cd ../IOExtras; ${MAKE} $@
|