ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/padSDL/Makefile
Revision: 1.2
Committed: 2003-02-14T22:06:54Z (21 years, 9 months ago) by cebix
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +14 -8 lines
Log Message:
added ePSXe support

File Contents

# User Rev Content
1 cebix 1.1 ## Version
2     VERSION = 1
3     BUILD = 1
4    
5     ## Files
6 cebix 1.2 PLUGIN = libpadSDL-$(VERSION).$(BUILD).so
7     PLUGINEPSXE = libpadSDL-epsxe-$(VERSION).$(BUILD).so
8 cebix 1.1 SRCS = padsdl.c
9    
10     ## Config
11     CC = gcc
12     CFLAGS = -O2 -fPIC
13     CPPFLAGS = `sdl-config --cflags` -DVERSION=$(VERSION) -DBUILD=$(BUILD)
14 cebix 1.2 LDFLAGS = -shared
15 cebix 1.1 LIBS = `sdl-config --libs`
16     SHELL = /bin/sh
17    
18     ## Rules
19 cebix 1.2 all: $(PLUGIN) $(PLUGINEPSXE)
20 cebix 1.1
21     DEPS = $(addprefix .deps/, $(addsuffix .P, $(basename $(SRCS))))
22    
23 cebix 1.2 $(PLUGIN): .deps padsdl.o
24     $(CC) $(LDFLAGS) -Wl,-soname,$(PLUGIN) -o $@ padsdl.o $(LIBS)
25 cebix 1.1
26 cebix 1.2 $(PLUGINEPSXE): .deps padsdl-epsxe.o
27     $(CC) $(LDFLAGS) -Wl,-soname,$(PLUGIN) -o $@ padsdl-epsxe.o $(LIBS)
28    
29     padsdl.o: padsdl.c
30 cebix 1.1 $(CC) $(CFLAGS) $(CPPFLAGS) -Wp,-MD,.deps/$(*F).P -o $@ -c $<
31    
32 cebix 1.2 padsdl-epsxe.o: padsdl.c
33     $(CC) $(CFLAGS) $(CPPFLAGS) -DEPSXE -Wp,-MD,.deps/$(*F).P -o $@ -c $<
34    
35 cebix 1.1 clean:
36 cebix 1.2 rm -f padsdl.o padsdl-epsxe.o $(PLUGIN) $(PLUGINEPSXE)
37 cebix 1.1
38     distclean: clean
39     rm -rf .deps
40    
41     .deps:
42     @[ -d .deps ] || mkdir .deps >/dev/null 2>&1
43    
44     -include $(DEPS)