frodo-wii/Makefile

45 lines
1013 B
Makefile
Raw Normal View History

CXX = g++
CC = gcc
LD = g++
CPP = cpp
2009-11-23 19:28:34 +01:00
ERROR_FILTER := 2>&1 | sed -e 's/\(.[a-zA-Z]\+\):\([0-9]\+\):/\1(\2):/g'
2009-11-23 07:14:38 +01:00
CFLAGS ?=-ggdb -Iinclude -Wall `sdl-config --cflags` -Imocks
DEFINES =
LDFLAGS ?= $(GCOV) `sdl-config --libs` -lSDL_ttf -lSDL_image
2009-11-23 07:14:38 +01:00
2009-11-23 19:52:30 +01:00
CPP_SRCS=menu.cpp main.cpp utils.cpp gui.cpp dialogue_box.cpp menu_messages.cpp \
timer.cpp game_info.cpp widget.cpp virtual_keyboard.cpp listener.cpp \
status_bar.cpp
2009-12-19 19:33:18 +01:00
OBJS=$(patsubst %.cpp,objs/%.o,$(CPP_SRCS)) $(patsubst %.c,objs/%.o,$(C_SRCS))
DEPS=$(patsubst %.cpp,deps/%.d,$(CPP_SRCS)) $(patsubst %.c,deps/%.d,$(C_SRCS))
2009-11-28 09:22:19 +01:00
TARGET=menu
2009-12-19 10:00:29 +01:00
all: $(DEPS) $(TARGET)
2009-11-23 19:52:30 +01:00
deps/%.d: %.cpp
@echo makedep $(notdir $<)
@install -d deps/$(dir $<)
@$(CPP) -M -MT objs/$(patsubst %.cpp,%.o,$<) $(DEFINES) $(CFLAGS) -o $@ $<
objs/%.o: %.cpp
@echo CXX $(notdir $<)
@install -d objs/$(dir $<)
@$(CXX) $(CFLAGS) $(DEFINES) -c -o $@ $< $(ERROR_FILTER)
2009-11-29 10:29:26 +01:00
clean:
rm -rf $(TARGET) *~ objs deps
2009-01-13 19:46:42 +01:00
2009-11-23 19:28:34 +01:00
$(TARGET): $(OBJS)
@echo LD $@
@$(LD) $(LDFLAGS) -o $@ $+
-include $(DEPS)