-# ----------------------------------------------------------------------------
-# Special flags for particular modules
-
-absCSyn/AbsCSyn_flags = -fno-omit-reexported-instances
-hsSyn/HsExpr_flags = -K2m
-hsSyn/HsSyn_flags = -fno-omit-reexported-instances
-main/Main_flags = -fvia-C
-basicTypes/IdInfo_flags = -K2m
-main/CmdLineOpts_flags = -fvia-C
-coreSyn/AnnCoreSyn_flags = -fno-omit-reexported-instances
-nativeGen/PprMach_flags = -K2m
-parser/UgenAll_flags = -fvia-C '-\#include"hspincl.h"'
-parser/UgenUtil_flags = -fvia-C '-\#include"hspincl.h"'
-parser/U_constr_flags = -fvia-C '-\#include"hspincl.h"'
-parser/U_binding_flags = -fvia-C '-\#include"hspincl.h"'
-parser/U_pbinding_flags = -fvia-C '-\#include"hspincl.h"'
-parser/U_entidt_flags = -fvia-C '-\#include"hspincl.h"'
-parser/U_list_flags = -fvia-C '-\#include"hspincl.h"'
-parser/U_literal_flags = -fvia-C '-\#include"hspincl.h"'
-parser/U_maybe_flags = -fvia-C '-\#include"hspincl.h"'
-parser/U_either_flags = -fvia-C '-\#include"hspincl.h"'
-parser/U_qid_flags = -fvia-C '-\#include"hspincl.h"'
-parser/U_tree_flags = -fvia-C '-\#include"hspincl.h"'
-parser/U_ttype_flags = -fvia-C '-\#include"hspincl.h"'
-prelude/PrimOp_flags = -K3m
-reader/ReadPrefix_flags = -fvia-C '-\#include"hspincl.h"'
-rename/ParseIface_flags = -Onot -H16m
-rename/RnMonad_flags = -fvia-C
-rename/RnSource_flags = -H12m
-rename/RnIfaces_flags = -H8m
-rename/RnNames_flags = -H12m
-specialise/Specialise_flags = -Onot -H12m
-stgSyn/StgSyn_flags = -fno-omit-reexported-instances
-typecheck/TcMonad_flags = -fvia-C
-typecheck/TcGenDeriv_flags = -H10m
-typecheck/TcExpr_flags = -H10m
-utils/Argv_flags = -fvia-C
-utils/CharSeq_flags = -fvia-C
-utils/SST_flags = -fvia-C
+#----------------------------------------------------------------------
+#
+# Building the stand-alone parser
+#
+all :: hsp
+
+hsp: parser/printtree.o parser/main.o libhsp.a
+ $(CC) -o $@ $(CC_OPTS) $^
+
+CLEAN_FILES += hsp
+#-----------------------------------------------------------------------------
+# Interface files
+
+# LoopHack.lhc is an SLPJ addition to fix a profiling problem. See comments
+# inside it. (compilation is handled by the suffix rules).
+
+#
+# Building the loop breakers from .lhi files
+#
+ifeq ($(Ghc2_0),YES)
+ %.hi : %_1_3.lhi
+ $(RM) $@
+ $(UNLIT) $< $@ || ( $(RM) $@ && exit 1 )
+ @chmod 444 $@
+else
+ %.hi : %.lhi
+ $(RM) $@
+ $(UNLIT) $< $@ || ( $(RM) $@ && exit 1 )
+ @chmod 444 $@
+endif
+
+#-----------------------------------------------------------------------------
+# Linking
+
+SRC_LD_OPTS += -no-link-chk
+
+# Build-specific
+#SRC_LD_OPTS += "-pgml time gcc -B/projects/unsupported/gnu/sparc-sunos5/bin/g"
+
+
+#-----------------------------------------------------------------------------
+# install
+
+# We don't want hsc treated as an ordinary executable,
+# but put it together with the libraries.
+# Also don't want any interface files intstalled
+
+INSTALL_LIBEXECS += hsc hsp