locks: makefile with bin directory and default file
authorGustavo Martin Morcuende <gu.martinm@gmail.com>
Sun, 29 May 2016 14:52:41 +0000 (16:52 +0200)
committerGustavo Martin Morcuende <gu.martinm@gmail.com>
Sun, 29 May 2016 14:52:41 +0000 (16:52 +0200)
locks/Makefile
locks/locks.c

index 0a216ce..dd83236 100644 (file)
@@ -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
index 149a2e6..734bb14 100644 (file)
@@ -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*/