SHARE
TWEET

makefile

a guest Sep 20th, 2019 86 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. CFLAGS= -c -Wall -Wextra -Werror -Iinclude
  2. all: lab1
  3.  
  4. lab1: bin main.o io.o util.o algorithm.o
  5.     gcc bin/main.o bin/io.o bin/util.o bin/algorithm.o -o lab1
  6. bin:
  7.     mkdir bin
  8. main.o: src/main.c include/io.h include/util.h include/algorithm.h | bin
  9.     gcc $(CFLAGS) src/main.c -o bin/main.o
  10. io.o: src/io.c | bin
  11.     gcc $(CFLAGS) src/io.c -o bin/io.o
  12. algorithm.o: src/algorithm.c include/io.h include/util.h | bin
  13.     gcc $(CFLAGS) src/algorithm.c -o bin/algorithm.o
  14. util.o: src/util.c | bin
  15.     gcc $(CFLAGS) src/util.c -o bin/util.o
  16. clean:
  17.     rm -rf bin lab1
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