Mercurial > hg > forks > 3x666-SDL
comparison Makefile.gen @ 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 | bac75122a38e |
children |
comparison
equal
deleted
inserted
replaced
43:8a7589da1bec | 44:e6cb35183ace |
---|---|
9 | 9 |
10 | 10 |
11 ### | 11 ### |
12 ### Generic targets | 12 ### Generic targets |
13 ### | 13 ### |
14 all: $(TARGETS) | 14 all: $(OBJPATH) $(TARGETS) |
15 | 15 |
16 $(OBJPATH)%.o: %.c %.h | 16 $(OBJPATH)%.o: %.c %.h |
17 $(CC) $(CFLAGS) -c -o $@ $< $(SDL_CFLAGS) | 17 $(CC) $(CFLAGS) -c -o $@ $< $(SDL_CFLAGS) |
18 | 18 |
19 $(OBJPATH)%.o: %.c | 19 $(OBJPATH)%.o: %.c |
20 $(CC) $(CFLAGS) -c -o $@ $< $(SDL_CFLAGS) | 20 $(CC) $(CFLAGS) -c -o $@ $< $(SDL_CFLAGS) |
21 | 21 |
22 $(OBJPATH): | |
23 mkdir -p $(OBJPATH) | |
22 | 24 |
23 ### | 25 ### |
24 ### Main demo | 26 ### Main demo |
25 ### | 27 ### |
26 $(OBJPATH)3x666.o: 3x666.c config.h 3xfont.h | 28 $(OBJPATH)3x666.o: 3x666.c config.h 3xfont.h |