+# -----------------------------------------------------------------------------
+# $Id: Makefile,v 1.5 2001/03/23 16:36:22 simonmar Exp $
+
TOP=../..
include $(TOP)/mk/boilerplate.mk
-INSTALL_PROGS += genprimopcode
-
-SRC_HC_OPTS += -syslib text
-OBJS = Main.o
-
-CLEAN_FILES += genprimopcode
-
-all :: genprimopcode
-
-genprimopcode: Main.o
- $(HC) -o $@ $(HC_OPTS) $(LD_OPTS) $(OBJS)
+HS_PROG = genprimopcode
+SRC_HC_OPTS += -syslib text
-CLEAN_FILES += genprimopcode
-CLEAN_FILES += $(OBJS)
+# genprimopcode is needed to boot in ghc/compiler...
+ifneq "$(BootingFromHc)" "YES"
+boot :: all
+endif
include $(TOP)/mk/target.mk