| | |
| | | all: |
| | | gcc -g -c -Wall -Werror -fpic list_in_shm.c memfd.c -lpthread |
| | | CC=gcc |
| | | AR=ar |
| | | CFLAGS=-g -D __SHMT_DEBUG_MODE__=1 -Wall -I${INCLUDE} |
| | | INCLUDE=-I. -I ../include |
| | | all:shmht shmht_mytests |
| | | gcc -g -c -Wall -Werror -I${INCLUDE} -fpic list_in_shm.c memfd.c -lpthread |
| | | gcc -shared -o liblistInShm.so list_in_shm.o memfd.o |
| | | gcc test_list_in_shm.c liblistInShm.so -lpthread |
| | | # gcc test_list_in_shm.c liblistInShm.so -lpthread |
| | | shmht: shmht.o memfd.o |
| | | $(CC) -o libshmht.so $(CFLAGS) -shared $^ |
| | | $(AR) rcs libshmht.a $^ |
| | | shmht.o: shmht.c shmht.h |
| | | $(CC) $(CFLAGS) $(INCLUDE) -fPIC -c shmht.c |
| | | shmht_mytests: shmht_mytests.o shmht.o memfd.o |
| | | $(CC) $(CFLAGS) $(INCLUDE) -L . -pthread -o $@ $^ |
| | | shmht_mytests.o: shmht.h |
| | | $(CC) $(CFLAGS) $(INCLUDE) -fPIC -c shmht_mytests.c |
| | | memfd.o: |
| | | $(CC) $(CFLAGS) $(INCLUDE) -fPIC -c memfd.c |
| | | clean: |
| | | rm -rf *.so *.o a.out |
| | | rm -rf *.so *.o a.out shmht_mytests *.a |