update Makefile
This commit is contained in:
parent
ca23bc5936
commit
5e66410346
16
Makefile
16
Makefile
|
@ -41,7 +41,7 @@ SRC = $(addprefix $(SRC_DIR), $(SRC_FILE))
|
||||||
OBJ = $(addprefix $(OBJ_DIR), $(OBJ_FILE))
|
OBJ = $(addprefix $(OBJ_DIR), $(OBJ_FILE))
|
||||||
INC = $(addprefix $(INC_DIR), $(INC_FILE))
|
INC = $(addprefix $(INC_DIR), $(INC_FILE))
|
||||||
|
|
||||||
LIB = -lm -lGL -lglfw -lGLEW #glew-2.2.0/lib/libGLEW.a
|
LIB = -lm -lGL -lglfw glew-2.2.0/lib/libGLEW.a
|
||||||
|
|
||||||
CC = gcc
|
CC = gcc
|
||||||
|
|
||||||
|
@ -57,8 +57,8 @@ WHITE = \033[0m
|
||||||
all: $(NAME)
|
all: $(NAME)
|
||||||
|
|
||||||
$(NAME): $(OBJ) $(INC)
|
$(NAME): $(OBJ) $(INC)
|
||||||
# @make -C glew-2.2.0
|
@make -C glew-2.2.0
|
||||||
@$(CC) $(CFLAGS) -c $(SRC) -I $(INC_DIR) #-I glew-2.2.0/include/
|
@$(CC) $(CFLAGS) -c $(SRC) -I $(INC_DIR) -I glew-2.2.0/include/
|
||||||
@mv $(OBJ_FILE) $(OBJ_DIR)
|
@mv $(OBJ_FILE) $(OBJ_DIR)
|
||||||
@$(CC) $(CFLAGS) $(OBJ) -o $(NAME) $(LIB)
|
@$(CC) $(CFLAGS) $(OBJ) -o $(NAME) $(LIB)
|
||||||
@echo -e "$(GREEN)[OK]$(WHITE) $(NAME)"
|
@echo -e "$(GREEN)[OK]$(WHITE) $(NAME)"
|
||||||
|
@ -67,7 +67,7 @@ $(OBJ_DIR)%.o: $(SRC_DIR)%.c inc/
|
||||||
@if [ ! -d ./obj ]; then \
|
@if [ ! -d ./obj ]; then \
|
||||||
mkdir -p ./obj; \
|
mkdir -p ./obj; \
|
||||||
fi;
|
fi;
|
||||||
@$(CC) $(CFLAGS) -I $(INC_DIR) -o $@ -c $< #-I glew-2.2.0/include/ -o $@ -c $<
|
@$(CC) $(CFLAGS) -I $(INC_DIR) -I glew-2.2.0/include/ -o $@ -c $<
|
||||||
@echo -e "$(CYAN)[CC]$(WHITE) $<"
|
@echo -e "$(CYAN)[CC]$(WHITE) $<"
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
@ -75,10 +75,14 @@ clean:
|
||||||
@echo -e "$(RED)[REMOVED]$(WHITE) obj files"
|
@echo -e "$(RED)[REMOVED]$(WHITE) obj files"
|
||||||
|
|
||||||
fclean: clean
|
fclean: clean
|
||||||
# make -C glew-2.2.0 clean
|
@make -C glew-2.2.0 clean
|
||||||
@rm -f $(NAME)
|
@rm -f $(NAME)
|
||||||
@echo -e "$(RED)[REMOVED]$(WHITE) $(NAME)"
|
@echo -e "$(RED)[REMOVED]$(WHITE) $(NAME)"
|
||||||
|
|
||||||
re: fclean all
|
re: fclean all
|
||||||
|
|
||||||
.PHONY: all clean fclean re
|
webgl:
|
||||||
|
@git submodule update --init
|
||||||
|
@make -C webgl
|
||||||
|
|
||||||
|
.PHONY: all clean fclean re webgl
|
||||||
|
|
Loading…
Reference in New Issue