diff options
author | mattn <mattn.jp@gmail.com> | 2013-05-08 20:18:08 +0900 |
---|---|---|
committer | mattn <mattn.jp@gmail.com> | 2013-05-08 20:18:08 +0900 |
commit | 4f0daba2cbb22736eeefdf2ec48bfa5471c24429 (patch) | |
tree | 8a25993b42f04a902193a0d7004c04921da2dc4c | |
parent | d344e6389eccb0bfb3e4f00074f3815b627a5b52 (diff) | |
download | vim-sonictemplate-4f0daba2cbb22736eeefdf2ec48bfa5471c24429.tar.gz vim-sonictemplate-4f0daba2cbb22736eeefdf2ec48bfa5471c24429.tar.bz2 vim-sonictemplate-4f0daba2cbb22736eeefdf2ec48bfa5471c24429.zip |
Add template for Makefile
-rw-r--r-- | template/make/base-c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/template/make/base-c b/template/make/base-c new file mode 100644 index 0000000..cab0056 --- /dev/null +++ b/template/make/base-c @@ -0,0 +1,19 @@ +SRCS = \ +{{_expr_:join(map(split(glob('*.c'),"\n"),'"\t".substitute(v:val,"\\","/","g")')," \\\n")}} + +OBJS = $(subst .c,.o,$(SRCS)) + +CFLAGS = +LIBS = +TARGET = {{_expr_:expand('%:p:h:t') . (has('win32')||has('win64')?'.exe':'')}} + +all : $(TARGET) + +$(TARGET) : $(OBJS) + gcc -o $@ $(OBJS) $(LIBS) + +.c.o : + gcc -c $(CFLAGS) -I. $< -o $@ + +clean : + rm -f *.o $(TARGET) |