Subversion Repositories Filer-Free

Rev

Rev 44 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
3 gdshaw@RISCPKG.ORG 1
# This file is part of the free Filer module for RISC OS.
2
# Copyright  2007 Graham Shaw.
3
# Redistribution and modification are permitted within the terms of the
4
# GNU General Public License (version 2 or any later version).
5
 
6
AS = as
7
CXX = g++
8
LD = g++
9
CMHG = cmunge
10
FIXDEPS = fixdeps
11
 
12
CPPFLAGS = -IOSLib:
64 gdshaw@RISCPKG.ORG 13
CXXFLAGS = -mthrowback -mlibscl -mmodule -fno-exceptions -Os \
44 gdshaw@RISCPKG.ORG 14
 -Wall -W -Wno-unused -Wno-uninitialized -mpoke-function-name
3 gdshaw@RISCPKG.ORG 15
ASFLAGS = -throwback -objasm -module -apcs32 -apcsfpv3 -target xscale -IOSLib:
16
LDFLAGS = -mlibscl -mmodule
17
CMHGFLAGS = -zoslib -zbase -tgcc -32bit
18
 
19
%.o: %.s
20
	$(AS) $(ASFLAGS) -o $@ $<
21
 
22
%.o: %.cc
23
	$(CXX) -c $(CPPFLAGS) $(CXXFLAGS) -o $@ $<
24
 
25
%.dd: %.cc
26
	$(CXX) -MM $(CPPFLAGS) $< > $@
27
 
28
%.d: %.dd
29
	$(FIXDEPS) $* < $< > $@
30
 
31
.DELETE_ON_ERROR:
32
 
33
SSRC = $(wildcard *.s)
34
CCSRC = $(wildcard *.cc)
35
 
36
.PHONY: all
37
all: Filer
38
 
39
.PHONY: clean
40
clean: always
41
	rm -f Filer
42
	rm -f $(wildcard *.o)
43
	rm -f header.h
44
 
45
.PHONY: always
46
 
47
Filer: $(SSRC:.s=.o) $(CCSRC:.cc=.o) header.o
48
	$(LD) $(LDFLAGS) -o $@ $^ OSLib:o.OSLib32
49
 
50
header.h header.o: header.cmhg Makefile
51
	$(CMHG) $(CMHGFLAGS) -d h.header -o o.header cmhg.header
52
 
53
$(SSRC:.s=.o) $(CCSRC:.cc=.o): Makefile
54
$(CCSRC:.cc=.dd): header.h
55
 
56
ifneq ($(MAKECMDGOALS),clean)
57
include $(CCSRC:.cc=.d)
58
endif