shm implemented as memfd syscall
cheliequan
2022-12-28 ca312c023b11d7885227addc7564494998d8898c
src/Makefile
@@ -9,11 +9,11 @@
shmht: shmht.o memfd.o
   $(CC) -o libshmht.so $(CFLAGS) -shared $^
   $(AR) rcs libshmht.a  $^
shmht.o: shmht.c shmht.h
shmht.o: shmht.c
   $(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
shmht_mytests.o:
   $(CC) $(CFLAGS) $(INCLUDE) -fPIC -c shmht_mytests.c
memfd.o:
   $(CC) $(CFLAGS) $(INCLUDE) -fPIC -c memfd.c
@@ -21,7 +21,9 @@
   $(CC) $(CFLAGS) $(INCLUDE) -fPIC -pthread -o $@ ipc_server.c -lipc_server -L .
libipc_server.so:
   $(CC) -shared -fPIC -o $@ ipc_server_lib.c ipc_msg.c memfd.c
ipc_client:
   $(CC) $(CFLAGS) $(INCLUDE) -fPIC -o $@ ipc_client.c ipc_msg.c memfd.c
ipc_client:libipc_client.so
   $(CC) $(CFLAGS) $(INCLUDE) -fPIC -o $@ ipc_client.c ipc_msg.c memfd.c -lipc_client -L .
libipc_client.so:
   $(CC) -shared -fPIC -o $@ ipc_client_lib.c ipc_msg.c memfd.c
clean:
   rm -rf *.so *.o a.out shmht_mytests *.a ipc_client ipc_server