Advertisement
Paszta

Systemy - gcc/mf - henlo

May 6th, 2019
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.51 KB | None | 0 0
  1. hello.h:
  2. #ifndef hw_hello
  3. #define hw_hello
  4. void f();
  5. #endif
  6.  
  7. hello.c:
  8. #include <stdio.h>
  9. #include <math.h>
  10. void f(){
  11. printf("kocham martwa babcie");
  12. printf("2*2 jest %f\n", pow(2,2));}
  13.  
  14. main.c:
  15. #include "hw_hello.h"
  16. int main(){
  17. f();
  18. return 0;
  19. }
  20.  
  21. makefile:
  22. .PHONY: clean
  23. all: kurwadajciezyc
  24. kurwaadjciezyc: hw_main.o
  25.     gcc -o kurwadjciezyc hw_main.o
  26. hw_main.o: hw_main.c hw_hello.h
  27.     gcc -c hw_main.c
  28. hw_hello.o: hw_hello.c hw_hello.h
  29.     gcc -c hw_hello.c
  30. clean:
  31.     rm -f *.o *.a *.so kurwadajciezyc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement