From a39cadc287ced7b1d274efd97710b70e1c4c5bd6 Mon Sep 17 00:00:00 2001 From: Gustavo Martin Morcuende Date: Sun, 29 May 2016 16:52:41 +0200 Subject: [PATCH] locks: makefile with bin directory and default file --- locks/Makefile | 3 ++- locks/locks.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/locks/Makefile b/locks/Makefile index 0a216ce..dd83236 100644 --- a/locks/Makefile +++ b/locks/Makefile @@ -1,7 +1,8 @@ all: locks locks: locks.c - gcc -Wall -g -o locks locks.c -lpthread + mkdir -p bin/ + gcc -Wall -g -o bin/locks locks.c -lpthread clean: rm -f locks diff --git a/locks/locks.c b/locks/locks.c index 149a2e6..734bb14 100644 --- a/locks/locks.c +++ b/locks/locks.c @@ -34,6 +34,7 @@ int main (int argc, char *argv[]) struct sigaction sa; /*sig actions values*/ bool isFileLock = false; bool isThread = false; + fileName = "/tmp/locks"; opterr = 0; @@ -105,7 +106,6 @@ int main (int argc, char *argv[]) return 0; } - int main_process () { pthread_t idThreadOne; /*Thread one identifier number*/ -- 2.1.4