Mercurial > MadButterfly
annotate examples/calculator/Makefile.pmake @ 335:01038b8d8f05
Set the progm to be NULL so that we won't call mb_progm_abort when we call it at the next time. This will fix the crash issue of the dynamic. However, the dynamic is still crash sometimes if we click the button quickly. It looks like it crashes in the refresh. We need to future figure out the issue.
author | wycc |
---|---|
date | Sat, 07 Mar 2009 14:24:55 +0800 |
parents | d0646a6df46f |
children |
rev | line source |
---|---|
88 | 1 SVG=calculator_scr.svg |
175
67e13d694230
Fix bug of src/Makefile.am & examples accept PREFIX variable.
Thinker K.F. Li <thinker@branda.to>
parents:
162
diff
changeset
|
2 PREFIX?=/usr/local |
67e13d694230
Fix bug of src/Makefile.am & examples accept PREFIX variable.
Thinker K.F. Li <thinker@branda.to>
parents:
162
diff
changeset
|
3 INCDIR?=$(PREFIX)/include |
67e13d694230
Fix bug of src/Makefile.am & examples accept PREFIX variable.
Thinker K.F. Li <thinker@branda.to>
parents:
162
diff
changeset
|
4 LIBDIR?=$(PREFIX)/lib |
67e13d694230
Fix bug of src/Makefile.am & examples accept PREFIX variable.
Thinker K.F. Li <thinker@branda.to>
parents:
162
diff
changeset
|
5 TOOLSDIR?=$(PREFIX)/share/mb |
67e13d694230
Fix bug of src/Makefile.am & examples accept PREFIX variable.
Thinker K.F. Li <thinker@branda.to>
parents:
162
diff
changeset
|
6 BINDIR?=$(PREFIX)/bin |
67e13d694230
Fix bug of src/Makefile.am & examples accept PREFIX variable.
Thinker K.F. Li <thinker@branda.to>
parents:
162
diff
changeset
|
7 INCS=-I$(INCDIR) |
67e13d694230
Fix bug of src/Makefile.am & examples accept PREFIX variable.
Thinker K.F. Li <thinker@branda.to>
parents:
162
diff
changeset
|
8 CFLAGS+=$(INCS) `pkg-config --cflags cairo` -Wall |
67e13d694230
Fix bug of src/Makefile.am & examples accept PREFIX variable.
Thinker K.F. Li <thinker@branda.to>
parents:
162
diff
changeset
|
9 LDFLAGS=-L$(LIBDIR) `pkg-config --libs cairo` |
88 | 10 LIBS=-lmbfly |
11 BINS= calc | |
175
67e13d694230
Fix bug of src/Makefile.am & examples accept PREFIX variable.
Thinker K.F. Li <thinker@branda.to>
parents:
162
diff
changeset
|
12 SVG2CODE= $(BINDIR)/svg2code.py |
67e13d694230
Fix bug of src/Makefile.am & examples accept PREFIX variable.
Thinker K.F. Li <thinker@branda.to>
parents:
162
diff
changeset
|
13 MB_C_HEADER= $(TOOLSDIR)/mb_c_header.m4 |
67e13d694230
Fix bug of src/Makefile.am & examples accept PREFIX variable.
Thinker K.F. Li <thinker@branda.to>
parents:
162
diff
changeset
|
14 MB_C_SOURCE= $(TOOLSDIR)/mb_c_source.m4 |
88 | 15 |
16 all: $(BINS) | |
17 | |
18 calc: main.o $(SVG:C/.svg/.o/) | |
19 $(CC) $(LDFLAGS) -o $@ $(.ALLSRC) $(LIBS) | |
20 | |
21 main.o: main.c $(SVG:C/.svg/.h/) | |
22 $(CC) $(CFLAGS) -c -o $@ main.c | |
23 | |
24 $(SVG:C/.svg/.o/): $(SVG:C/.svg/.c/) $(SVG:C/.svg/.h/) | |
25 $(CC) -c $(CFLAGS) -o $@ $(SVG:C/.svg/.c/) | |
26 | |
27 $(SVG:C/.svg/.mb/): $(SVG) | |
162
5535899513ce
* patch for linux, and a trick symbol link to include <mb/mb.h>
"Mat <MatLinuxer2@gmail.com>"
parents:
137
diff
changeset
|
28 $(SVG2CODE) $(.ALLSRC) $@ |
88 | 29 |
30 $(SVG:C/.svg/.c/): $(SVG:C/.svg/.mb/) | |
162
5535899513ce
* patch for linux, and a trick symbol link to include <mb/mb.h>
"Mat <MatLinuxer2@gmail.com>"
parents:
137
diff
changeset
|
31 m4 -I $(TOOLSDIR) $(MB_C_SOURCE) $(.ALLSRC) > $@ |
88 | 32 |
33 $(SVG:C/.svg/.h/): $(SVG:C/.svg/.mb/) | |
162
5535899513ce
* patch for linux, and a trick symbol link to include <mb/mb.h>
"Mat <MatLinuxer2@gmail.com>"
parents:
137
diff
changeset
|
34 m4 -I $(TOOLSDIR) $(MB_C_HEADER) $(.ALLSRC) > $@ |
88 | 35 |
36 clean: | |
90 | 37 for i in *.mb *.o *.core *~ $(SVG:C/.svg/.c/) $(SVG:C/.svg/.h/) $(BINS); do \ |
88 | 38 if [ -e "$$i" ]; then \ |
39 echo "delete $$i"; \ | |
40 rm -f "$$i"; \ | |
41 fi; \ | |
137 | 42 done |