2005-06-29 Jonathan Chambers <jonathan.chambers@ansys.com>
[mcs.git] / tools / cilc / res-Makefile
blob27edfceff984eda1e8e8c62bbc7b2af2179dc2b4
1 include defs.mk
3 LIBNAME = $(shell echo $(basename $(SONAME)) | sed -e 's/^lib//')
4 HTARGET = $(prefix)/include/$(LIBNAME)/
5 LIBTARGET = $(prefix)/lib/
7 CFLAGS += -static -fpic $(shell pkg-config --cflags glib-2.0 gobject-2.0 mono) $(EXTRAINCLUDES) -I.
9 ifdef bundle
10 EXTRAOBJS = bundle.o
11 CFLAGS += -DCILC_BUNDLE
12 EXTRATARGETS = bundle.h
13 endif
15 ifndef prefix
16 prefix = $(CWD)
17 endif
19 all: $(SONAME)
21 $(SONAME): $(EXTRAOBJS) $(OBJS)
22         gcc -Wall -fpic -shared `pkg-config --libs glib-2.0 gobject-2.0 mono` -lpthread $(EXTRAOBJS) $(OBJS) $(EXTRALIBS) -o $(SONAME)
24 $(LIBNAME).o: $(EXTRATARGETS)
26 bundle.o bundle.h: $(ASSEMBLY)
27         mkbundle -c -o bundle.c.tmp -oo bundle.o $(ASSEMBLY)
28         rm -f xx*
29         csplit bundle.c.tmp /mono_main/
30         mv xx00 bundle.h
31         rm -f xx*
32         rm -f bundle.c.tmp
34 install_libs: $(SONAME)
35         mkdir -p $(LIBTARGET)
36         install -s $(SONAME) $(LIBTARGET)
38 install_headers: *.h
39         mkdir -p $(HTARGET)
40         install *.h $(HTARGET)
42 install: install_libs install_headers
44 clean:
45         rm -rf core *~ *.o *.so bundle.h