Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CC=gcc
- CAR=ar
- CRANLIB=ranlib
- OS = $(shell uname)
- ifeq ($(OS), Linux)
- LINUX_LIBS=-lsubunit -lrt -lpthread -lm
- else
- LINUX_LIBS=
- endif
- # FLAGS=-Wall -Werror -Wextra -std=c11
- # FLAGS=-Wall -Wextra
- #CHECKLIB=-I../../.brew/include
- #CHECKLIB=-I../../../.brew/include -L../../../.brew/Cellar/check/0.15.2/lib
- LCHECK=`pkg-config --cflags --libs check`
- FILE1=s21_cat
- FILE2=test_cat
- TARGETDIR=./
- all: s21_cat
- s21_cat: $(FILE1).c
- $(CC) -o $(TARGETDIR)$(FILE1) $(FLAGS) $(FILE1).c
- test: s21_cat
- $(CC) -o $(TARGETDIR)$(FILE2) $(FLAGS) $(FILE2).c $(CHECKLIB) $(LCHECK)
- -./$(FILE2)
- clean:
- rm -rf *.o *.a *.out *.hex *. 1 2 result
- rm -rf $(TARGETDIR)$(FILE1)
- rm -rf $(TARGETDIR)$(FILE2)
- # Frequent typo
- claen: clean
- clear: clean
- claer: clean
- rebuild:
- make clean
- make all
- rm -rf *.o *.a
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement