diff --git a/templates/CMakeLists.txt.template b/templates/CMakeLists.txt.template new file mode 100644 index 0000000..09cdcbb --- /dev/null +++ b/templates/CMakeLists.txt.template @@ -0,0 +1,10 @@ +###################################################################### +# @author : {{NAME}} ({{EMAIL}}) +# @file : {{FILE}} +# @created : {{TIMESTAMP}} +###################################################################### + +cmake_minimum_required(VERSION 2.8) +project({{CURSOR}} C) + +add_executable(main main.c) diff --git a/templates/Makefile.template b/templates/Makefile.template new file mode 100644 index 0000000..1155ae9 --- /dev/null +++ b/templates/Makefile.template @@ -0,0 +1,27 @@ +###################################################################### +# @author : {{NAME}} ({{EMAIL}}) +# @file : {{FILE}} +# @created : {{TIMESTAMP}} +###################################################################### + +IDIR =./include +CC=gcc +CFLAGS=-I$(IDIR) + +ODIR=obj + +LIBS= + +_OBJ = main.o {{CURSOR}} +OBJ = $(patsubst %,$(ODIR)/%,$(_OBJ)) + +$(ODIR)/%.o: %.c + $(CC) -c -o $@ $< $(CFLAGS) + +main: $(OBJ) + $(CC) -o $@ $^ $(CFLAGS) $(LIBS) + +.PHONY: clean + +clean: + rm -f $(ODIR)/*.o diff --git a/templates/main.c.template b/templates/main.c.template new file mode 100644 index 0000000..d2935d8 --- /dev/null +++ b/templates/main.c.template @@ -0,0 +1,13 @@ +/** + * @author : {{NAME}} ({{EMAIL}}) + * @file : {{FILE}} + * @created : {{TIMESTAMP}} + */ + +#include + +int main() +{ + {{CURSOR}} + return 0; +} diff --git a/templates/main.cpp.template b/templates/main.cpp.template new file mode 100644 index 0000000..b698dba --- /dev/null +++ b/templates/main.cpp.template @@ -0,0 +1,13 @@ +/** + * @author : {{NAME}} ({{EMAIL}}) + * @file : {{FILE}} + * @created : {{TIMESTAMP}} + */ + +#include + +int main() +{ + {{CURSOR}} + return 0; +}