/+junk/c_sdl_joypad_ducktape

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/%2Bjunk/c_sdl_joypad_ducktape

« back to all changes in this revision

Viewing changes to Makefile

  • Committer: Gustav Hartvigsson
  • Date: 2014-01-11 23:53:51 UTC
  • Revision ID: gustav.hartvigsson@gmail.com-20140111235351-esn2xhqjg2c6ir9g
* moved the files to ./src/
* fixed a few problems useing some haxx.
* Changed Makefile to take into account the file move and made it better.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
CC=gcc
2
2
CFLAGS=`pkg-config sdl2 --cflags` -Wall -g -std=c11
3
3
LIBS=`pkg-config sdl2 --libs`
4
 
OBJECTS=main.o Game.o GameButton.o MousePointer.o game_utils.o GameObject.o
 
4
 
 
5
DEPS=src/Game.h\
 
6
     src/GameObject.h\
 
7
     src/MousePointer.h\
 
8
     src/game_utils.h\
 
9
     src/GameObject.h
 
10
 
 
11
OBJECTS=obj/main.o\
 
12
        obj/Game.o\
 
13
        obj/GameButton.o\
 
14
        obj/MousePointer.o\
 
15
        obj/game_utils.o\
 
16
        obj/GameObject.o
 
17
 
5
18
EXEC=SdlJs
6
19
 
7
20
$(EXEC):$(OBJECTS)
8
 
        $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
 
21
        $(CC) -o $@ $^ $(CFLAGS) $(LIBS) 
9
22
 
10
 
%.o: %.c %.h
 
23
obj/%.o: src/%.c $(DEPS)
11
24
        $(CC) $(CFLAGS) -c -o $@ $< 
12
25
 
13
26
.PHONY: clean run