-
Notifications
You must be signed in to change notification settings - Fork 480
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make install target #97
Comments
Here is a rough draft, all: sds-install sds-lib sds-test
sds-install: sds-lib
cp -a libsds.so.2.0.0 /usr/local/lib/
ln -s /usr/local/lib/libsds.so.2.0.0 /usr/local/lib/libsds.so
ln -s /usr/local/lib/libsds.so.2.0.0 /usr/local/lib/libsds.so.2
mkdir -p /usr/local/include/sds
cp -a sds.h /usr/local/include/sds/
sds-lib: sds.c sds.h sdsalloc.h
$(CC) -fPIC -fstack-protector -std=c99 -pedantic -Wall -Werror -shared \
-o libsds.so.2.0.0 -Wl,-soname=libsds.so.2.0.0 sds.c sds.h sdsalloc.h
sds-test: sds.c sds.h testhelp.h
$(CC) -o sds-test sds.c -Wall -std=c99 -pedantic -O2 -DSDS_TEST_MAIN
@echo ">>> Type ./sds-test to run the sds.c unit tests."
clean:
rm -f sds-test libsd.so.2.0.0 See also: cJSON/Makefile Also, the compiler complains about
Bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64502 Here is an example program, #include <sds/sds.h>
#include <stdio.h>
int main (void)
{
sds mystring = sdsnew("Hello World!");
printf("%s\n", mystring);
sdsfree(mystring);
return 0;
} Compile with
NOTE: Don't forget to run |
oxr463
added a commit
to oxr463/sds
that referenced
this issue
May 6, 2019
oxr463
added a commit
to oxr463/sds
that referenced
this issue
May 12, 2020
oxr463
added a commit
to oxr463/sds
that referenced
this issue
May 12, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
May be will be useful add
make install
target.The text was updated successfully, but these errors were encountered: