[project @ 2005-11-25 13:56:16 by simonmar]
[ghc-hetmet.git] / ghc / utils / genprimopcode / Makefile
index 50c363b..dbd69f6 100644 (file)
@@ -1,19 +1,19 @@
 TOP=../..
 include $(TOP)/mk/boilerplate.mk
 
-INSTALL_PROGS += genprimopcode
+HS_PROG = genprimopcode
 
-SRC_HC_OPTS += -syslib text
-OBJS = Main.o
+ifeq "$(ghc_ge_504)" "NO"
+SRC_HC_OPTS += -package text
+endif
 
-CLEAN_FILES += genprimopcode
+ifeq "$(ghc_ge_602)" "YES"
+SRC_HC_OPTS += -package parsec
+endif
 
-all :: genprimopcode
-
-genprimopcode: Main.o
-       $(HC) -o $@ $(HC_OPTS) $(LD_OPTS) $(OBJS)
-
-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