Project

General

Profile

Statistics
| Revision:

root / branches / simulator / projects / simulator / simulator / Makefile @ 1064

History | View | Annotate | Download (840 Bytes)

1
# Add new files here
2
COMMON_SRCS :=
3
CORE_SRCS := main.c robot.c motion.c world.c rangefinders.c
4
GUI_SRCS := gtk_gui.c gtk_environment_view.c
5

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

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

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

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

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

    
26
CC := gcc
27

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

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

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