From 38af32c47112c1833669f87f0f626f4e6dcfa067 Mon Sep 17 00:00:00 2001
From: P. J. McDermott <pj@pehjota.net>
Date: Fri, 26 Feb 2016 18:33:49 -0500
Subject: eshtrans/Makefile: Make libeshprof optional

---
(limited to 'eshtrans/Makefile')

diff --git a/eshtrans/Makefile b/eshtrans/Makefile
index 8ab8310..a2ff5c9 100644
--- a/eshtrans/Makefile
+++ b/eshtrans/Makefile
@@ -11,6 +11,10 @@ OBJECTS1 = $(SOURCES:.esh=.sh1)
 OBJECTS2 = $(SOURCES:.esh=.sh2)
 OBJECTS3 = $(SOURCES:.esh=.sh3)
 
+WITH_PROF = n
+PROF_y = ../libeshprof/hooks.esh
+PROF = $(PROF_$(WITH_PROF))
+
 bootstrap: stage3
 stage1:
 	@printf 'Stage 1:\n'
@@ -37,10 +41,10 @@ eshtrans.stage1: $(OBJECTS1) Makefile
 	cat $(OBJECTS1) >$@
 	printf 'main "$${@}"\n' >>$@
 	chmod a+x $@
-eshtrans.stage2: eshtrans.stage1 $(OBJECTS2) ../libeshprof/hooks.esh Makefile
-	../eshld/eshld -o $@ $(OBJECTS2) ../libeshprof/hooks.esh
-eshtrans.stage3: eshtrans.stage2 $(OBJECTS3) ../libeshprof/hooks.esh Makefile
-	../eshld/eshld -o $@ $(OBJECTS3) ../libeshprof/hooks.esh
+eshtrans.stage2: eshtrans.stage1 $(OBJECTS2) $(PROF) Makefile
+	../eshld/eshld -o $@ $(OBJECTS2) $(PROF)
+eshtrans.stage3: eshtrans.stage2 $(OBJECTS3) $(PROF) Makefile
+	../eshld/eshld -o $@ $(OBJECTS3) $(PROF)
 
 $(OBJECTS1) $(OBJECTS2) $(OBJECTS3): Makefile
 
--
cgit v0.9.1