SHARE
TWEET

Untitled

a guest May 1st, 2018 66 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. .PHONY: clean
  2. .SUFFIXES: .c .o .a .so
  3. vpath %.c src
  4. vpath %.h include
  5. program: program.o lib/libjp.a lib/libgr.so
  6. %.o: %.c
  7.     gcc -w -fPIC -c $<
  8. lib/libjp.a: pj.o pp.o
  9.     ar rs $@ $<
  10. lib/libgr.so: pg.o pr.o
  11.     gcc -w -shared -o $@ $<
  12. %: %.o
  13.     gcc -o $@ $^ -L./lib -I./include
  14.  
  15. program.o: program.c include/libjp.h include/libgr.h
  16.  
  17. pj.o: pj.c
  18. pp.o: pp.c
  19. pg.o: pg.c
  20. pr.o: pr.c
  21.  
  22. clean:
  23.     rm -f program *.o *.a *.so
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