diff options
| author | Michael Grunder <michael.grunder@gmail.com> | 2021-12-16 12:36:05 -0800 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-12-16 12:36:05 -0800 | 
| commit | e3a479e4098dddbf0b075bbe81b0baca5fe0e3df (patch) | |
| tree | ad8daeeae56c70fee9f0a43fda5f65933800f555 /Makefile | |
| parent | da5a4ff3622e8744b772a76f6ce580dc9134fb38 (diff) | |
| download | hiredict-e3a479e4098dddbf0b075bbe81b0baca5fe0e3df.tar.xz | |
FreeBSD build fixes + CI (#1026)
* BSD linkage fix proposal
* Touch up the Makefile to fix BSD builds
Fixes #984
* Add a build in FreeBSD to GitHub Actions
Lots of people use hiredis in FreeBSD so this should reduce some pain
moving forward.
Co-authored-by: David Carlier <devnexen@gmail.com>
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 12 | 
1 files changed, 11 insertions, 1 deletions
@@ -92,6 +92,16 @@ else    SSL_LDFLAGS+=-L$(OPENSSL_PREFIX)/lib -lssl -lcrypto  endif +ifeq ($(uname_S),FreeBSD) +  LDFLAGS+=-lm +  IS_GCC=$(shell sh -c '$(CC) --version 2>/dev/null |egrep -i -c "gcc"') +  ifeq ($(IS_GCC),1) +    REAL_CFLAGS+=-pedantic +  endif +else +  REAL_CFLAGS+=-pedantic +endif +  ifeq ($(uname_S),SunOS)    IS_SUN_CC=$(shell sh -c '$(CC) -V 2>&1 |egrep -i -c "sun|studio"')    ifeq ($(IS_SUN_CC),1) @@ -231,7 +241,7 @@ check: hiredis-test  	TEST_SSL=$(USE_SSL) ./test.sh  .c.o: -	$(CC) -std=c99 -pedantic -c $(REAL_CFLAGS) $< +	$(CC) -std=c99 -c $(REAL_CFLAGS) $<  clean:  	rm -rf $(DYLIBNAME) $(STLIBNAME) $(SSL_DYLIBNAME) $(SSL_STLIBNAME) $(TESTS) $(PKGCONFNAME) examples/hiredis-example* *.o *.gcda *.gcno *.gcov  | 
