Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sources=$(wildcard *.c)
- objekti=$(sources:.c=.o)
- EXEC = calculate
- # sve posle dve tacke se zove DEPENDENCY
- all:$(EXEC)
- $(EXEC) : $(objekti)
- gcc -o $@ $(objekti)
- calculate.o : calculate.c helper.h
- gcc -c calculate.c # ovde ne navodim .h fajlove, sami se includuju
- helper.o : helper.c helper.h
- gcc -c helper.c
- .PHONY : clean
- clean:
- # If ther is a file - remove it, otherwise do nothing (-f)
- rm -f $(objekti) $(EXEC)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement