daily pastebin goal
1%
SHARE
TWEET

Untitled

a guest Jan 18th, 2019 52 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. code.o: code.cpp code.hpp dep1.hpp de2.hpp
  2.     g++ -c code.cpp
  3.    
  4. OBJS := foo.o bar.o
  5.  
  6. #Your program should have the objects as dependencies, and link them
  7. proggie: $(OBJS)
  8. gcc $(OBJS) -o proggie
  9.  
  10.  
  11. # compile
  12. %.o: %.c
  13.     gcc -c $(CFLAGS) $*.c -o $*.o
  14.    
  15. # pull in dependency info for *existing* .o files
  16. -include $(OBJS:.o=.d)
  17.  
  18.  
  19. # compile and generate dependency info
  20. %.o: %.c
  21.     gcc -c $(CFLAGS) $*.c -o $*.o
  22.     gcc -MM $(CFLAGS) $*.c > $*.d
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top