mirror of
https://github.com/Oibaf66/frodo-wii.git
synced 2024-11-14 07:35:12 +01:00
Refactor the makefile for host builds (completely). This is step 1,
the second is to go through the warnings and ... fix them!
This commit is contained in:
parent
ae65fe354c
commit
a71a5b1870
4
Makefile
Normal file
4
Makefile
Normal file
@ -0,0 +1,4 @@
|
||||
all: message
|
||||
|
||||
message:
|
||||
@echo "Run make -f Makefile.host or make -f Makefile.wii instead"
|
77
Makefile.host
Normal file
77
Makefile.host
Normal file
@ -0,0 +1,77 @@
|
||||
######################################################################
|
||||
##
|
||||
## 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 $@ $+
|
@ -1,4 +1,4 @@
|
||||
# Makefile.in for Frodo (generic Unix/X11)
|
||||
b# Makefile.in for Frodo (generic Unix/X11)
|
||||
|
||||
## Version information
|
||||
VERSION = 4
|
||||
|
Loading…
Reference in New Issue
Block a user