cleaning things up a bit

This commit is contained in:
Dan Buch 2011-06-16 21:46:56 -04:00
parent e026dabefb
commit 731e1002cd
10 changed files with 39 additions and 7 deletions

6
.gitignore vendored
View File

@ -1,5 +1 @@
gowrikumar/00-sizeof gowrikumar/bin
gowrikumar/02-dowhile
gowrikumar/03-stdoutbuf
gowrikumar/03b-stdoutbuf
gowrikumar/03c-stdoutbuf

View File

@ -1,7 +1,10 @@
# puzzles from http://www.gowrikumar.com/c/ BINDIR := ./bin
export BINDIR
all: $(patsubst %.c,%,$(wildcard *.c)) all:
cd src && $(MAKE)
.PHONY: all .PHONY: all

0
gowrikumar/bin/.keep Normal file
View File

View File

@ -0,0 +1,19 @@
/**
* :author: Dan Buch (daniel.buch@gmail.com)
*/
#include <stdio.h>
#define f(a, b) a##b
#define g(a) #a
#define h(a) g(a)
int main()
{
printf("%s\n", h(f(1, 2)));
printf("%s\n", g(f(1, 2)));
return 0;
}
/* vim:filetype=c:fileencoding=utf-8
*/

14
gowrikumar/src/Makefile Normal file
View File

@ -0,0 +1,14 @@
# puzzles from http://www.gowrikumar.com/c/
BINDIR := ../bin
ALL_BIN := $(patsubst %.c,$(BINDIR)/%,$(wildcard *.c))
$(BINDIR)/%: %.c
$(CC) -o $@ $<
all: $(ALL_BIN)
.PHONY: all