mirror of
https://github.com/Oibaf66/frodo-wii.git
synced 2024-11-10 21:55:11 +01:00
a71a5b1870
the second is to go through the warnings and ... fix them!
78 lines
2.0 KiB
Makefile
78 lines
2.0 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 -Iinclude -Wall `sdl-config --cflags`
|
|
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/menu.cpp\
|
|
Src/CIA_SC.cpp Src/CPU1541_SC.cpp Src/CPU_common.cpp Src/Network.cpp \
|
|
Src/VirtualKeyboard.cpp
|
|
|
|
C_SRCS=Src/d64-read.c Src/menutexts.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: deps $(TARGET)
|
|
deps: $(DEPS)
|
|
|
|
-include $(DEPS)
|
|
|
|
clean:
|
|
rm -rf objs-host/* deps/* *.gcda *.gcno *~ $(TARGET) $(TARGET)-gcov
|
|
|
|
deps/%.d: %.cpp
|
|
@echo makedep $(notdir $<)
|
|
@install -d deps/$(dir $<)
|
|
@$(CPP) -M $(DEFINES) $(CFLAGS) -o $@ $<
|
|
|
|
deps/%.d: %.c
|
|
@echo makedep $(notdir $<)
|
|
@install -d deps/$(dir $<)
|
|
@$(CPP) -M $(DEFINES) $(CFLAGS) -o $@ $<
|
|
|
|
objs-host/%.o: %.cpp
|
|
@echo $(notdir $<)
|
|
@install -d objs-host/$(dir $<)
|
|
@$(CXX) $(CFLAGS) $(DEFINES) -c -o $@ $< $(ERROR_FILTER)
|
|
|
|
objs-host/%.o: %.c
|
|
@echo $(notdir $<)
|
|
@install -d objs-host/$(dir $<)
|
|
@$(CC) $(CFLAGS) $(DEFINES) -c -o $@ $< $(ERROR_FILTER)
|
|
|
|
$(TARGET): $(OBJS)
|
|
$(LD) $(LDFLAGS) -o $@ $+
|