got rid of the cmake based builds, and moved to a plain old makefile! :D

This commit is contained in:
hayden 2019-08-05 16:18:43 -05:00
parent e2a274613b
commit a6561b8c9a
4 changed files with 33 additions and 19 deletions

5
.gitignore vendored Normal file
View File

@ -0,0 +1,5 @@
*.swp
obj/
worlds/
plugins/
cobble

View File

@ -1,17 +0,0 @@
cmake_minimum_required(VERSION 3.14)
project(cobble)
set(CMAKE_C_STANDARD 99)
set(CMAKE_C_FLAGS "-DLOG_USE_COLOR")
include_directories(include)
file(GLOB src
"config.h"
"src/*.c"
"src/*.h"
)
add_executable(cobble ${src})
target_link_libraries(cobble pthread crypto)

24
Makefile Normal file
View File

@ -0,0 +1,24 @@
EXE = cobble
SRC_DIR = src
OBJ_DIR = obj
SRC = $(wildcard $(SRC_DIR)/*.c)
OBJ = $(SRC:$(SRC_DIR)/%.c=$(OBJ_DIR)/%.o)
CFLAGS += -Wall -Iinclude/ -DLOG_USE_COLOR
LDFLAGS += -Llib
LDFLAGS += -lpthread -lcrypto
CC = gcc
.PHONY: all clean
all: $(EXE)
$(EXE): $(OBJ)
$(CC) $(LDFLAGS) $^ $(LDLIBS) -o $@
$(OBJ_DIR)/%.o: $(SRC_DIR)/%.c
$(CC) $(CFLAGS) -c $< -o $@
clean:
$(RM) $(OBJ)
$(RM) $(EXE)

View File

@ -1,11 +1,13 @@
/* see LICENSE file for copyright and license details. */
#pragma once
enum Dimension {
#include <stdint.h>
typedef enum {
OVERWORLD,
NETHER,
END
};
} Dimension;
typedef struct {
uint64_t seed;