.PHONY: all test clean build SRC = src/main.c OJB = $(SRC:.c=.o) OUT = build CC = /usr/bin/gcc CFLAGS = -ansi -Wall -std=c99 -O0 CFDEBUG = -ansi -Wall -g -std=c99 RM = /bin/rm -fr TEST = -D TEST_TECH PART = -D PART_ EVE = -D EVE_ %.o: %.c $(CC) -c $(CFLAGS) build: $(CC) $(SRC) $(PART)$(part) $(EVE)$(eve) $(CFLAGS) -o $(OUT)/main.o build_test: $(CC) $(SRC) $(CFLAGS) $(TEST) -o $(OUT)/main.o debug: $(CC) $(SRC) $(PART)$(part) $(CFDEBUG) -o $(OUT)/main.o clean: $(RM) $(OBJ) $(OUT)/main.o run: $(MAKE) build && ./build/main.o test: $(MAKE) build_test && ./build/main.o