~ubuntu-branches/ubuntu/edgy/swig1.3/edgy

« back to all changes in this revision

Viewing changes to Examples/php4/overloading/Makefile

  • Committer: Bazaar Package Importer
  • Author(s): Adam Conrad
  • Date: 2005-12-05 01:16:04 UTC
  • mfrom: (1.2.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20051205011604-ygx904it6413k3go
Tags: 1.3.27-1ubuntu1
Resynchronise with Debian again, for the new subversion packages.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
SWIGFLAGS   = -c++
 
3
 
 
4
C_SOURCES   = 
 
5
CXX_SOURCES = example.cxx
 
6
 
 
7
SWIG = ../../../swig
 
8
 
 
9
all: check
 
10
 
 
11
example_wrap.cpp: example.i
 
12
        $(SWIG) -php4 $(SWIGFLAGS) example.i
 
13
 
 
14
OBJS= example_wrap.o $(C_SOURCES:.c=.o) $(CXX_SOURCES:.cxx=.o)
 
15
 
 
16
PROG=php_example.so
 
17
 
 
18
PHP_INC=`php-config --includes`
 
19
 
 
20
CFLAGS  = -fpic
 
21
LDFLAGS = -shared
 
22
 
 
23
$(PROG): $(OBJS)
 
24
        $(CXX) $(LDFLAGS) $(OBJS) -o $(PROG) $(EXTRA_LIB)
 
25
 
 
26
%.o: %.cpp
 
27
        $(CXX) $(PHP_INC) $(CFLAGS) -c $<
 
28
%.o: %.cxx
 
29
        $(CXX) $(PHP_INC) $(CFLAGS) -c $<
 
30
%.o: %.c
 
31
        $(CC) $(PHP_INC) $(CFLAGS) -c $<
 
32
 
 
33
check: $(PROG)
 
34
        @php -d extension_dir=. runme.php4
 
35
 
 
36
clean:
 
37
        rm -f example_wrap.* *.o *~ *.so core example.php php_example.h