Guest User

Untitled

a guest
Dec 9th, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.65 KB | None | 0 0
  1. CC = gcc
  2. CFLAGS = -g -Wall -W
  3. DEL_FILE = rm -f
  4. #include "../client/checker.h"
  5. #include "../client/checker.o"
  6. #include "../client/cli_utils.h"
  7. #include "../client/cli_utils.c"
  8.  
  9. OBJECTS = main.o
  10. ../client/checker.o
  11. ../client/cli_utils.o
  12.  
  13. default: master
  14.  
  15. master: $(OBJECTS)
  16. $(CC) $(CFLAGS) -o master $(OBJECTS)
  17.  
  18. main.o: main.c ../client/checker.h
  19. ../client/cli_utils.h
  20. $(CC) -c $(CFLAGS) -o main.o main.c
  21.  
  22. clean:
  23. -$(DEL_FILE) master
  24. -$(DEL_FILE) $(OBJECTS)
  25.  
  26. #include "../client/checker.h"
  27. #include "../client/checker.o"
  28. #include "../client/cli_utils.h"
  29. #include "../client/cli_utils.c"
  30.  
  31. make -C client
  32. make[1]: Entering directory '/home/linoukth/port/client'
  33. gcc -c -g -Wall -W -o main.o main.c
  34. gcc -c -g -Wall -W -o checker.o checker.c
  35. gcc -c -g -Wall -W -o cli_utils.o cli_utils.c
  36. gcc -g -Wall -W -o client main.o checker.o cli_utils.o
  37. make[1]: Leaving directory '/home/linoukth/port/client'
  38. make -C master
  39. make[1]: Entering directory '/home/linoukth/port/master'
  40. gcc -c -g -Wall -W -I ../client -o main.o main.c
  41. In file included from main.c:4:0:
  42. ../client/checker.h:37:17: error: unknown type name ‘pid_t’
  43. void check_fork(pid_t pid_check, int caller);
  44. ^
  45. makefile:26: recipe for target 'main.o' failed
  46. make[1]: *** [main.o] Error 1
  47. make[1]: Leaving directory '/home/linoukth/port/master'
  48. makefile:10: recipe for target 'allmake' failed
  49. make: *** [allmake] Error 2
  50.  
  51. error: unknown type name ‘pid_t’
  52.  
  53. #include <stdio.h>
  54. #include <fcntl.h>
  55. #include <string.h>
  56. #include <stdlib.h>
  57. #include <unistd.h>
  58. #include <signal.h>
  59. #include <sys/types.h>
  60.  
  61. #include "checker.h"
Add Comment
Please, Sign In to add comment