Add world generator sources and binary
This commit is contained in:
22
worldgen-c/Makefile
Normal file
22
worldgen-c/Makefile
Normal file
@@ -0,0 +1,22 @@
|
||||
CC ?= gcc
|
||||
CFLAGS ?= -O3 -march=native -std=c11 -Wall -Wextra -pedantic -Iinclude
|
||||
LDFLAGS ?= -lm -pthread -lz
|
||||
|
||||
SRC := src/main.c src/worldgen.c src/noise.c
|
||||
OBJ := $(SRC:.c=.o)
|
||||
|
||||
BIN_DIR := bin
|
||||
TARGET := $(BIN_DIR)/worldgen
|
||||
|
||||
all: $(TARGET)
|
||||
|
||||
$(TARGET): $(OBJ) | $(BIN_DIR)
|
||||
$(CC) $(CFLAGS) $(OBJ) -o $@ $(LDFLAGS)
|
||||
|
||||
$(BIN_DIR):
|
||||
mkdir -p $(BIN_DIR)
|
||||
|
||||
clean:
|
||||
rm -f $(OBJ) $(TARGET)
|
||||
|
||||
.PHONY: all clean
|
||||
Reference in New Issue
Block a user