From 055bad853d2fef9fef81252769cfd87649c17973 Mon Sep 17 00:00:00 2001 From: tmeissner Date: Fri, 15 May 2015 21:51:18 +0200 Subject: [PATCH] moved source files in sub dirs for chapters; split Makefile for chapter10 & chapter11 sources --- 21st_century_c/chapter10/Makefile | 22 ++++++++++++++++++++ 21st_century_c/{ => chapter10}/boxes.c | 0 21st_century_c/{ => chapter10}/process_dir.c | 0 21st_century_c/{ => chapter10}/process_dir.h | 0 21st_century_c/{ => chapter10}/show_tree.c | 0 21st_century_c/{ => chapter11}/Makefile | 0 21st_century_c/{ => chapter11}/complex.c | 0 21st_century_c/{ => chapter11}/cplx.h | 0 21st_century_c/{ => chapter11}/seamlessone.c | 0 21st_century_c/{ => chapter11}/simple_cplx.c | 0 10 files changed, 22 insertions(+) create mode 100644 21st_century_c/chapter10/Makefile rename 21st_century_c/{ => chapter10}/boxes.c (100%) rename 21st_century_c/{ => chapter10}/process_dir.c (100%) rename 21st_century_c/{ => chapter10}/process_dir.h (100%) rename 21st_century_c/{ => chapter10}/show_tree.c (100%) rename 21st_century_c/{ => chapter11}/Makefile (100%) rename 21st_century_c/{ => chapter11}/complex.c (100%) rename 21st_century_c/{ => chapter11}/cplx.h (100%) rename 21st_century_c/{ => chapter11}/seamlessone.c (100%) rename 21st_century_c/{ => chapter11}/simple_cplx.c (100%) diff --git a/21st_century_c/chapter10/Makefile b/21st_century_c/chapter10/Makefile new file mode 100644 index 0000000..e8968e0 --- /dev/null +++ b/21st_century_c/chapter10/Makefile @@ -0,0 +1,22 @@ +CFLAGS = -Wall -O3 --std=c11 + + +boxes : boxes.c + $(CC) $(CFLAGS) $@.c -o $@ + +show_tree : process_dir.h process_dir.c show_tree.c + $(CC) $(CFLAGS) process_dir.c $@.c -o $@ + + +.PHONY : all +all : boxes show_tree + +.PHONY : check +check : *.h *.c + cppcheck --enable=warning --enable=style *.c + +.PHONY : clean +clean : + rm -f boxes + rm -f show_tree + rm -rf *.dSYM diff --git a/21st_century_c/boxes.c b/21st_century_c/chapter10/boxes.c similarity index 100% rename from 21st_century_c/boxes.c rename to 21st_century_c/chapter10/boxes.c diff --git a/21st_century_c/process_dir.c b/21st_century_c/chapter10/process_dir.c similarity index 100% rename from 21st_century_c/process_dir.c rename to 21st_century_c/chapter10/process_dir.c diff --git a/21st_century_c/process_dir.h b/21st_century_c/chapter10/process_dir.h similarity index 100% rename from 21st_century_c/process_dir.h rename to 21st_century_c/chapter10/process_dir.h diff --git a/21st_century_c/show_tree.c b/21st_century_c/chapter10/show_tree.c similarity index 100% rename from 21st_century_c/show_tree.c rename to 21st_century_c/chapter10/show_tree.c diff --git a/21st_century_c/Makefile b/21st_century_c/chapter11/Makefile similarity index 100% rename from 21st_century_c/Makefile rename to 21st_century_c/chapter11/Makefile diff --git a/21st_century_c/complex.c b/21st_century_c/chapter11/complex.c similarity index 100% rename from 21st_century_c/complex.c rename to 21st_century_c/chapter11/complex.c diff --git a/21st_century_c/cplx.h b/21st_century_c/chapter11/cplx.h similarity index 100% rename from 21st_century_c/cplx.h rename to 21st_century_c/chapter11/cplx.h diff --git a/21st_century_c/seamlessone.c b/21st_century_c/chapter11/seamlessone.c similarity index 100% rename from 21st_century_c/seamlessone.c rename to 21st_century_c/chapter11/seamlessone.c diff --git a/21st_century_c/simple_cplx.c b/21st_century_c/chapter11/simple_cplx.c similarity index 100% rename from 21st_century_c/simple_cplx.c rename to 21st_century_c/chapter11/simple_cplx.c