Guest User

Untitled

a guest
Jul 22nd, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.25 KB | None | 0 0
  1. CC = gcc
  2. DD = g++
  3. CFLAGS = -g -Wall -c
  4. LDFLAGS = -g -Wall -L"."
  5. ALL = libsched.a test1 test_faq test_read test_klimek test_glon
  6. LIBS = -lsched -lrt
  7.  
  8. all: $(ALL)
  9.  
  10. queue.o: err.h queue.h queue.c
  11. $(CC) $(CFLAGS) queue.c
  12.  
  13. err.o: err.h err.c
  14. $(CC) $(CFLAGS) err.c
  15.  
  16. sched.o: sched.h sched.c queue.h err.h
  17. $(CC) $(CFLAGS) sched.c
  18.  
  19. libsched.a: queue.o err.o sched.o
  20. ar rc libsched.a queue.o err.o sched.o
  21.  
  22. test1: libsched.a test1.c
  23. $(CC) $(LDFLAGS) test1.c -o test1 $(LIBS)
  24.  
  25. test_faq.o: sched.h test_faq.c
  26. $(CC) $(CFLAGS) test_faq.c
  27.  
  28. test_faq: libsched.a test_faq.o
  29. $(CC) $(LDFLAGS) libsched.a test_faq.o -o test_faq $(LIBS)
  30.  
  31. test_read.o: sched.h test_read.c
  32. $(CC) $(CFLAGS) test_read.c
  33.  
  34. test_read: libsched.a test_read.o
  35. $(CC) $(LDFLAGS) libsched.a test_read.o -o test_read $(LIBS)
  36.  
  37. test_glon.o: sched.h test_glon.c
  38. $(CC) $(CFLAGS) test_glon.c
  39.  
  40. test_glon: libsched.a test_glon.o
  41. $(CC) $(LDFLAGS) libsched.a test_glon.o -o test_glon $(LIBS)
  42.  
  43. test_klimek.o: sched.h test_klimek.cpp
  44. $(DD) $(CFLAGS) test_klimek.cpp
  45.  
  46. test_klimek: libsched.a test_klimek.o
  47. $(DD) $(LDFLAGS) libsched.a test_klimek.o -o test_klimek $(LIBS)
  48.  
  49. clean:
  50. rm -f *.o
  51.  
  52. cleanall:
  53. rm -f *.o test1 test_faq test_read test_klimek test_glon libsched.a
Add Comment
Please, Sign In to add comment