changeset 44:e6cb35183ace default tip

Create object file target directory automatically.
author Matti Hamalainen <ccr@tnsp.org>
date Tue, 19 Mar 2013 07:23:05 +0200
parents 8a7589da1bec
children
files Makefile.gen
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile.gen	Tue Mar 19 05:09:41 2013 +0200
+++ b/Makefile.gen	Tue Mar 19 07:23:05 2013 +0200
@@ -11,7 +11,7 @@
 ###
 ### Generic targets
 ###
-all: $(TARGETS)
+all: $(OBJPATH) $(TARGETS)
 
 $(OBJPATH)%.o: %.c %.h
 	$(CC) $(CFLAGS) -c -o $@ $< $(SDL_CFLAGS)
@@ -19,6 +19,8 @@
 $(OBJPATH)%.o: %.c
 	$(CC) $(CFLAGS) -c -o $@ $< $(SDL_CFLAGS)
 
+$(OBJPATH):
+	mkdir -p $(OBJPATH)
 
 ###
 ### Main demo