parent
13465911d7
commit
4286a0ba7c
@ -0,0 +1,21 @@ |
|||||||
|
PROJECT_NAME=Symmetry
|
||||||
|
CC=gcc
|
||||||
|
SRC_DIR=../../src
|
||||||
|
SRCS=$(patsubst $(SRC_DIR)/%.c, %.c, $(wildcard ../../src/*.c))
|
||||||
|
OBJS=$(patsubst %.c,%.o,$(SRCS))
|
||||||
|
CFLAGS= -g -Wall
|
||||||
|
LIBS=$(shell pkg-config --static --libs glfw3 glew)
|
||||||
|
|
||||||
|
all: $(OBJS) |
||||||
|
echo $(SRCS)
|
||||||
|
echo $(OBJS)
|
||||||
|
$(CC) $(CFLAGS) -o $(PROJECT_NAME) $^ $(LIBS)
|
||||||
|
|
||||||
|
%.o: $(SRC_DIR)/%.c |
||||||
|
$(CC) -c $< -o $@
|
||||||
|
|
||||||
|
clean: |
||||||
|
@echo $(SRCS)
|
||||||
|
@echo $(OBJS)
|
||||||
|
rm $(PROJECT_NAME)
|
||||||
|
rm $(OBJS)
|
@ -1,32 +0,0 @@ |
|||||||
solution "Symmetry" |
|
||||||
configurations {"Debug", "Release"} |
|
||||||
location "build" |
|
||||||
language "C" |
|
||||||
includedirs {"include/**"} |
|
||||||
buildoptions {"-Wall", "-std=c11"} |
|
||||||
linkoptions { "`pkg-config --libs --static glfw3`" } |
|
||||||
links {"GLEW"} |
|
||||||
local lib_base = "libs" |
|
||||||
|
|
||||||
-- local cmd_stream = assert(io.popen("pkg-config --libs --static glfw3", r)) |
|
||||||
-- local libs_to_link = assert(cmd_stream:read("*all")) |
|
||||||
-- cmd_stream:close() |
|
||||||
-- libs_to_link = string.gsub(libs_to_link, "-lglfw", "") |
|
||||||
-- libs_to_link = string.gsub(libs_to_link, "\n", "") |
|
||||||
-- linkoptions {libs_to_link} |
|
||||||
|
|
||||||
project "Symmetry" |
|
||||||
kind "ConsoleApp" |
|
||||||
files { "src/*.h", "src/*.c"} |
|
||||||
|
|
||||||
configuration "Debug" |
|
||||||
flags {"Symbols"} |
|
||||||
libdirs {path.join(lib_base, "debug/**")} |
|
||||||
targetdir "bin/debug" |
|
||||||
|
|
||||||
configuration "Release" |
|
||||||
defines {"NDEBUG"} |
|
||||||
flags {"Optimize"} |
|
||||||
libdirs {path.join(lib_base, "release/**")} |
|
||||||
targetdir "bin/release" |
|
||||||
|
|
Loading…
Reference in new issue