Project

General

Profile

Statistics
| Revision:

root / branches / simulator / projects / simulator / simulator / Makefile @ 1068

History | View | Annotate | Download (859 Bytes)

1
# Add new files here
2
COMMON_SRCS :=
3
CORE_SRCS := main.c robot.c motion.c world.c logger.c player.c rangefinders.c
4

    
5
GUI_SRCS := gtk_gui.c gtk_environment_view.c
6

    
7
CORE_DIR := core
8
GUI_DIR := gui
9
COMMON_DIR := ../common
10

    
11
SRCS = $(addprefix $(COMMON_DIR)/, $(COMMON_SRCS))
12
SRCS += $(addprefix $(CORE_DIR)/, $(CORE_SRCS))
13
SRCS += $(addprefix $(GUI_DIR)/, $(GUI_SRCS))
14
OBJS = $(patsubst %.c, %.o, $(SRCS))
15
VIM_LEFTOVERS = $(CORE_DIR)/*~ $(COMMON_DIR)/*~ $(GUI_DIR)/*~
16
PROG = simulator
17

    
18
INCLUDES = -I$(COMMON_DIR) -I$(CORE_DIR) -I$(GUI_DIR)
19

    
20
CFLAGS = -Wall -g
21
CFLAGS += $(INCLUDES)
22
CFLAGS += `pkg-config --cflags gtk+-2.0 gthread-2.0`
23

    
24
LDFLAGS :=
25
LDFLAGS += `pkg-config --libs gtk+-2.0 gthread-2.0`
26

    
27
CC := gcc
28

    
29
all: $(OBJS)
30
	$(CC) $(CFLAGS) $(LDFLAGS) -o $(PROG) $(OBJS)
31

    
32
%.o: %.c %.h
33
	$(CC) $(CFLAGS) -c -o $@ $<
34

    
35
clean:
36
	rm -f *~ $(OBJS) $(VIM_LEFTOVERS) $(PROG)
37