Skip to content

Instantly share code, notes, and snippets.

@rksys
Last active April 1, 2017 01:16
Show Gist options
  • Save rksys/5681566bad0d180de754ae3d28f3814b to your computer and use it in GitHub Desktop.
Save rksys/5681566bad0d180de754ae3d28f3814b to your computer and use it in GitHub Desktop.
cc=gcc
cflags=-std=gnu99 -g -Wall
target: libsm.a dsm test_client
libsm.a: libsm.o
ar rvs libsm.a libsm.o
libsm.o:sm.c sm.h message.h message.c mem.h mem.c
$(cc) $(cflags) -c sm.c -o libsm.o
dsm: dsm.c message.h message.c mem.h mem.c
$(cc) -c dsm.c -o dsm
test_client:test_client.c libsm.a
$(cc) $(cflags) -o test_client test_client.c libsm.a
clean:
rm dsm *.o *.a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment