ref: 74ee76b6cdc98826b2a31475625ad21d36989801
parent: bea180125fdfc4d44d516ac110a8f83c50aad695
parent: c5bd2add37725041c1924132a8a4fd67548fb975
author: Sai Krishna <srallaba@cs.cmu.edu>
date: Wed Aug 12 16:21:19 EDT 2020
Merge pull request #21 from Pummelo65/master Install under MacOs
--- a/main/Makefile
+++ b/main/Makefile
@@ -34,6 +34,13 @@
## Top level user programs ##
## ##
###########################################################################
+# MacOS does not accept -pd options to the cp command
+ UNAME_S := $(shell uname -s)
+ifeq ($(UNAME_S),Darwin)
+CP_FLAGS='-r'
+else
+CP_FLAGS='-pd'
+endif
TOP=..
DIRNAME=main
BUILD_DIRS =
@@ -152,8 +159,8 @@
done
$(INSTALL) -m 755 $(BINDIR)/flite_time $(DESTDIR)$(INSTALLBINDIR)
# The libraries: static and shared (if built)
- cp -pd $(flite_LIBS_deps) $(DESTDIR)$(INSTALLLIBDIR)
+ cp $(CP_FLAGS) $(flite_LIBS_deps) $(DESTDIR)$(INSTALLLIBDIR)
ifdef SHFLAGS
- cp -pd $(SHAREDLIBS) $(VERSIONSHAREDLIBS) $(DESTDIR)$(INSTALLLIBDIR)
+ cp $(CP_FLAGS) $(SHAREDLIBS) $(VERSIONSHAREDLIBS) $(DESTDIR)$(INSTALLLIBDIR)
endif