Skip to content

Commit

Permalink
fix building on 10.6.8 without breaking other versions
Browse files Browse the repository at this point in the history
simplified IS_APPLE grep command by having it return count, with a max find limit of 1 for both Apple $(CC) expected patterns
  • Loading branch information
rpinz committed Dec 16, 2015
1 parent 534746b commit d086384
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ PKGCFGDIR ?= $(LIBDATADIR)/pkgconfig
API_MAJOR=$(shell echo `grep -e CS_API_MAJOR include/capstone.h | grep -v = | awk '{print $$3}'` | awk '{print $$1}')
VERSION_EXT =

IS_APPLE := $(shell $(CC) -dM -E - < /dev/null | grep -e __apple_build_version__ -e __APPLE_CC__ | wc -l | tr -d " ")
IS_APPLE := $(shell $(CC) -dM -E - < /dev/null | grep -cm 1 -e __apple_build_version__ -e __APPLE_CC__)
ifeq ($(IS_APPLE),1)
EXT = dylib
VERSION_EXT = $(API_MAJOR).$(EXT)
Expand Down

0 comments on commit d086384

Please sign in to comment.