mirror of
https://github.com/Oibaf66/frodo-wii.git
synced 2024-11-29 15:04:23 +01:00
85 lines
2.4 KiB
Makefile
85 lines
2.4 KiB
Makefile
######################################################################
|
|
##
|
|
## Copyright (C) 2008-2010, Simon Kagstrom
|
|
##
|
|
## Filename: Makefile
|
|
## Author: Simon Kagstrom <simon.kagstrom@gmail.com>
|
|
## Description: Makefile for host builds (from Cibyl)
|
|
##
|
|
## $Id:$
|
|
##
|
|
######################################################################
|
|
CXX = g++
|
|
CC = gcc
|
|
LD = g++
|
|
CPP = cpp
|
|
|
|
ERROR_FILTER := 2>&1 | sed -e 's/\(.[a-zA-Z]\+\):\([0-9]\+\):/\1(\2):/g'
|
|
|
|
|
|
PREFIX ?= /usr/local
|
|
exec_prefix = ${PREFIX}
|
|
bindir = ${exec_prefix}/bin
|
|
datadir = ${PREFIX}/share
|
|
#GCOV=-fprofile-arcs -ftest-coverage
|
|
|
|
|
|
CFLAGS ?=-ggdb -Wall `sdl-config --cflags` -ISrc -O2
|
|
DEFINES =-DFRODO_SC -DHAVE_CONFIG_H -DDATADIR=\"$(datadir)/frodo/\" -DBINDIR=\"$(bindir)/\" -DHAVE_SDL
|
|
|
|
LDFLAGS ?= $(GCOV) `sdl-config --libs` -lSDL_ttf -lSDL_image
|
|
|
|
|
|
CPP_SRCS=Src/C64_SC.cpp Src/main.cpp Src/Display.cpp Src/Prefs.cpp Src/SID.cpp \
|
|
Src/REU.cpp Src/IEC.cpp Src/1541fs.cpp Src/1541d64.cpp Src/1541t64.cpp \
|
|
Src/1541job.cpp Src/SAM.cpp Src/CPUC64_SC.cpp Src/VIC_SC.cpp \
|
|
Src/CIA_SC.cpp Src/CPU1541_SC.cpp Src/CPU_common.cpp Src/Network.cpp \
|
|
Src/gui/menu_messages.cpp Src/gui/dialogue_box.cpp Src/gui/widget.cpp \
|
|
Src/gui/game_info.cpp Src/gui/status_bar.cpp Src/gui/gui.cpp Src/gui/listener.cpp \
|
|
Src/timer.cpp Src/utils.cpp Src/gui/virtual_keyboard.cpp Src/gui/menu.cpp \
|
|
Src/gui/file_browser.cpp
|
|
|
|
C_SRCS=Src/d64-read.c
|
|
|
|
|
|
OBJS=$(patsubst %.cpp,objs-host/%.o,$(CPP_SRCS)) $(patsubst %.c,objs-host/%.o,$(C_SRCS))
|
|
DEPS=$(patsubst %.cpp,deps/%.d,$(CPP_SRCS)) $(patsubst %.c,deps/%.d,$(C_SRCS))
|
|
|
|
|
|
TARGET=frodo
|
|
|
|
all: Src/sysconfig.h deps $(TARGET)
|
|
deps: $(DEPS)
|
|
|
|
-include $(DEPS)
|
|
|
|
Src/sysconfig.h: Src/sysconfig.h.Host-SDL
|
|
cp $< $@
|
|
|
|
clean:
|
|
rm -rf objs-host/* deps/* *.gcda *.gcno *~ $(TARGET) $(TARGET)-gcov
|
|
|
|
deps/%.d: %.cpp
|
|
@echo makedep $(notdir $<)
|
|
@install -d deps/$(dir $<)
|
|
@$(CPP) -M -MT objs-host/$(patsubst %.cpp,%.o,$<) $(DEFINES) $(CFLAGS) -o $@ $<
|
|
|
|
deps/%.d: %.c
|
|
@echo makedep $(notdir $<)
|
|
@install -d deps/$(dir $<)
|
|
@$(CPP) -M -MT objs-host/$(patsubst %.c,%.o,$<) $(DEFINES) $(CFLAGS) -o $@ $<
|
|
|
|
objs-host/%.o: %.cpp
|
|
@echo CXX $(notdir $<)
|
|
@install -d objs-host/$(dir $<)
|
|
@$(CXX) $(CFLAGS) $(DEFINES) -c -o $@ $< $(ERROR_FILTER)
|
|
|
|
objs-host/%.o: %.c
|
|
@echo CC $(notdir $<)
|
|
@install -d objs-host/$(dir $<)
|
|
@$(CC) $(CFLAGS) $(DEFINES) -c -o $@ $< $(ERROR_FILTER)
|
|
|
|
$(TARGET): $(OBJS)
|
|
@echo LD $@
|
|
@$(LD) $(LDFLAGS) -o $@ $+
|