Initial Commit
This commit is contained in:
26
render/build/Makefile
Normal file
26
render/build/Makefile
Normal file
@@ -0,0 +1,26 @@
|
||||
CC = gcc
|
||||
CFLAGS = -Wall -O2
|
||||
|
||||
SRC_DIR = ../src
|
||||
OBJ_DIR = ../obj
|
||||
BUILD_DIR = .
|
||||
|
||||
TARGET = $(BUILD_DIR)/cube_render
|
||||
|
||||
SRCS = $(wildcard $(SRC_DIR)/*.c)
|
||||
OBJS = $(SRCS:$(SRC_DIR)/%.c=$(OBJ_DIR)/%.o)
|
||||
|
||||
all: $(TARGET)
|
||||
|
||||
$(TARGET): $(OBJS)
|
||||
$(CC) $(CFLAGS) -o $@ $^ -lm
|
||||
|
||||
$(OBJ_DIR)/%.o: $(SRC_DIR)/%.c
|
||||
@mkdir -p $(OBJ_DIR)
|
||||
$(CC) $(CFLAGS) -c $< -o $@
|
||||
|
||||
clean:
|
||||
rm -rf $(OBJ_DIR)/*.o $(TARGET)
|
||||
|
||||
rebuild: clean all
|
||||
|
||||
BIN
render/build/cube_render
Executable file
BIN
render/build/cube_render
Executable file
Binary file not shown.
Reference in New Issue
Block a user