mirror of
https://github.com/Cubitect/cubiomes.git
synced 2025-08-03 09:46:41 -04:00

* added basic support for cmake (#127) * renamed Winter Drop version from MC_1_21_3 to MC_1_21_WD * updated world spawn location for 1.21.2 (cubiomes-viewer #340) * tweaked mc version to text conversion (#128) * removed properties field in structure config and added dimension field instead * moved biome tree selection back to biomenoise.c as it's slightly faster and avoids globals
66 lines
1.2 KiB
Makefile
66 lines
1.2 KiB
Makefile
#CC = gcc
|
|
#AR = ar
|
|
ARFLAGS = cr
|
|
override LDFLAGS = -lm
|
|
override CFLAGS += -Wall -Wextra -fwrapv
|
|
|
|
ifeq ($(OS),Windows_NT)
|
|
override CFLAGS += -D_WIN32
|
|
CC = gcc
|
|
RM = del
|
|
else
|
|
override LDFLAGS += -pthread
|
|
#RM = rm
|
|
endif
|
|
|
|
.PHONY : all debug release native libcubiomes clean
|
|
|
|
all: release
|
|
|
|
debug: CFLAGS += -DDEBUG -O0 -ggdb3
|
|
debug: libcubiomes
|
|
release: CFLAGS += -O3
|
|
release: libcubiomes
|
|
native: CFLAGS += -O3 -march=native -ffast-math
|
|
native: libcubiomes
|
|
|
|
ifneq ($(OS),Windows_NT)
|
|
release: CFLAGS += -fPIC
|
|
#debug: CFLAGS += -fsanitize=undefined
|
|
endif
|
|
|
|
|
|
libcubiomes: noise.o biomes.o layers.o biomenoise.o generator.o finders.o util.o quadbase.o
|
|
$(AR) $(ARFLAGS) libcubiomes.a $^
|
|
|
|
finders.o: finders.c finders.h
|
|
$(CC) -c $(CFLAGS) $<
|
|
|
|
generator.o: generator.c generator.h
|
|
$(CC) -c $(CFLAGS) $<
|
|
|
|
biomenoise.o: biomenoise.c
|
|
$(CC) -c $(CFLAGS) $<
|
|
|
|
biometree.o: biometree.c
|
|
$(CC) -c $(CFLAGS) $<
|
|
|
|
layers.o: layers.c layers.h
|
|
$(CC) -c $(CFLAGS) $<
|
|
|
|
biomes.o: biomes.c biomes.h
|
|
$(CC) -c $(CFLAGS) $<
|
|
|
|
noise.o: noise.c noise.h
|
|
$(CC) -c $(CFLAGS) $<
|
|
|
|
util.o: util.c util.h
|
|
$(CC) -c $(CFLAGS) $<
|
|
|
|
quadbase.o: quadbase.c quadbase.h
|
|
$(CC) -c $(CFLAGS) $<
|
|
|
|
clean:
|
|
$(RM) *.o *.a
|
|
|