First working cmake version
This commit is contained in:
parent
94c88d09e9
commit
e6639a159c
5 changed files with 14 additions and 50 deletions
|
@ -0,0 +1,7 @@
|
||||||
|
cmake_minimum_required(VERSION 3.5)
|
||||||
|
set(CMAKE_C_FLAGS "-std=c99 -g -Wall")
|
||||||
|
set(CMAKE_INSTALL_PREFIX ".")
|
||||||
|
|
||||||
|
include_directories(include)
|
||||||
|
project(utictactoe)
|
||||||
|
add_executable(${PROJECT_NAME} src/utictactoe.c src/model.c)
|
25
Makefile
25
Makefile
|
@ -1,25 +0,0 @@
|
||||||
## Makefile for uTicTacToe project
|
|
||||||
## --
|
|
||||||
##
|
|
||||||
|
|
||||||
# flags
|
|
||||||
CC=gcc
|
|
||||||
CFLAGS=-Wall -g -std=c99
|
|
||||||
CPPFLAGS=
|
|
||||||
|
|
||||||
all: build
|
|
||||||
|
|
||||||
build: src/utictactoe.c
|
|
||||||
$(CC) $(CFQLGS) $< -o utictactoe
|
|
||||||
|
|
||||||
.PHONY: clean help
|
|
||||||
|
|
||||||
clean: ## Clean files
|
|
||||||
rm -f src\*.o utictactoe
|
|
||||||
|
|
||||||
help:
|
|
||||||
@echo "Makefile pour UTicTacToe"
|
|
||||||
@echo "--"
|
|
||||||
@echo " all: tout compiler"
|
|
||||||
@echo "build: compiler utictactoe"
|
|
||||||
@echo "clean: nettoyer"
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
cmake_minimum_required(VERSION 3.5)
|
||||||
|
set(CMAKE_C_FLAGS "-std=c99 -g -Wall")
|
||||||
|
set(CMAKE_INSTALL_PREFIX ".")
|
||||||
|
include_directories(../include)
|
||||||
|
|
||||||
|
project(utictactoe)
|
||||||
|
add_executable(${PROJECT_NAME} utictactoe.c model.c)
|
25
src/Makefile
25
src/Makefile
|
@ -1,25 +0,0 @@
|
||||||
# Flags
|
|
||||||
## Build Ultimate TicTacToe
|
|
||||||
## ------------------------
|
|
||||||
## This Makefile Help you to build utictactoe
|
|
||||||
## --
|
|
||||||
|
|
||||||
|
|
||||||
CC=gcc
|
|
||||||
CFLAGS=-Wall -g -std=c99
|
|
||||||
CPPFLAGS=-I../include
|
|
||||||
|
|
||||||
all: utictactoe
|
|
||||||
|
|
||||||
utictactoe: utictactoe.c model.c## Compile utictactoe.c
|
|
||||||
|
|
||||||
# Nettoyage
|
|
||||||
.PHONY: clean help
|
|
||||||
clean: ## Clean files
|
|
||||||
rm -f *.o utictactoe
|
|
||||||
|
|
||||||
help:
|
|
||||||
@echo "Makefile pour UTicTacToe"
|
|
||||||
@echo "--"
|
|
||||||
@echo " all: tout compiler"
|
|
||||||
@echo "clean: nettoyer"
|
|
BIN
src/utictactoe
BIN
src/utictactoe
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue