diff --git a/CMakeLists.txt b/CMakeLists.txt index e3b10a6..7b0d8a7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,12 +1,16 @@ #version minimale de cmake nécessaire cmake_minimum_required(VERSION 2.6) + #nom du projet -project () +project (game_text) + #positionne la variable set(CMAKE_C_FLAGS "-std=c99 -g -Wall") + #définit le nom du programme ainsi que #ses sources -add_executable() +add_executable(game_text game_text.c) + #les dépendances sont calculées automatiquement -target_link_libraries() -add_library () +target_link_libraries(game_text libgame) +add_library (libgame game.o game_aux.c) diff --git a/Makefile b/Makefile deleted file mode 100644 index b909c8c..0000000 --- a/Makefile +++ /dev/null @@ -1,25 +0,0 @@ -CC=gcc # compilateur -CFLAGS=-Wall -std=c99 # options de compilation -LDFLAGS=-L. # options de link -LDLIBS=-lgame # bibliothèques -CPPFLAGS= # options de preprocessing -AR= ar - -all: game_text - -libgame.a: game_aux.o game.o - $(AR) rcs $@ $^ - -game_text: game_text.o libgame.a - $(CC) $(LDFLAGS) $^ -o $@ $(LDLIBS) - -.PHONY: clean dep - -include dep - -# génération des dépendances -dep: - $(CC) -MM *.c > dep - -clean: - rm -f dep game_aux.o *~ game_text game_text.o libgame.a \ No newline at end of file