Makefile

Wed, 20 Jun 2007 22:24:09 +0200

author
Tuomo Valkonen <tuomov@iki.fi>
date
Wed, 20 Jun 2007 22:24:09 +0200
changeset 112
ccc57312b8d0
parent 103
76174c5f04b5
child 113
0f2da6be13b1
permissions
-rw-r--r--

CF_NO_GETTEXT

3
b1fbfab67908 trunk: changeset 6
tuomov
parents: 1
diff changeset
1 ##
b1fbfab67908 trunk: changeset 6
tuomov
parents: 1
diff changeset
2 ## libtu Makefile
b1fbfab67908 trunk: changeset 6
tuomov
parents: 1
diff changeset
3 ##
0
86b7f6f9c5c0 Tailorization of trunk
tailor@f281.ttorni.ton.tut.fi
parents:
diff changeset
4
3
b1fbfab67908 trunk: changeset 6
tuomov
parents: 1
diff changeset
5 # System-specific configuration is in system.mk
50
855953c2f413 trunk: changeset 54
tuomov
parents: 48
diff changeset
6 TOPDIR=.
103
76174c5f04b5 Path fix
Tuomo Valkonen <tuomov@iki.fi>
parents: 102
diff changeset
7 include $(TOPDIR)/build/system-inc.mk
0
86b7f6f9c5c0 Tailorization of trunk
tailor@f281.ttorni.ton.tut.fi
parents:
diff changeset
8
86b7f6f9c5c0 Tailorization of trunk
tailor@f281.ttorni.ton.tut.fi
parents:
diff changeset
9 ######################################
86b7f6f9c5c0 Tailorization of trunk
tailor@f281.ttorni.ton.tut.fi
parents:
diff changeset
10
57
de75d868bc0b trunk: changeset 1220
tuomov
parents: 50
diff changeset
11 CFLAGS += $(C89_SOURCE) $(POSIX_SOURCE)
5
f878a9ffa3e0 trunk: changeset 8
tuomov
parents: 3
diff changeset
12
60
a4033700e35c trunk: changeset 1313
tuomov
parents: 58
diff changeset
13 SOURCES=misc.c output.c util.c optparser.c parser.c tokenizer.c \
90
f5a392131875 Renamed Symlist PtrList.
Tuomo Valkonen <tuomov@iki.fi>
parents: 73
diff changeset
14 map.c obj.c objlist.c errorlog.c ptrlist.c rb.c \
97
daf2b3d79cb8 Added setparam.c.
Tuomo Valkonen <tuomov@iki.fi>
parents: 94
diff changeset
15 stringstore.c iterable.c setparam.c
0
86b7f6f9c5c0 Tailorization of trunk
tailor@f281.ttorni.ton.tut.fi
parents:
diff changeset
16
27
228f64ffb422 trunk: changeset 30
tuomov
parents: 25
diff changeset
17 ifdef LIBTU_NO_ERRMSG
28
01745c3150ad trunk: changeset 31
tuomov
parents: 27
diff changeset
18 DEFINES += -DLIBTU_NO_ERRMSG
27
228f64ffb422 trunk: changeset 30
tuomov
parents: 25
diff changeset
19 else
25
9d41e3611050 trunk: changeset 28
tuomov
parents: 23
diff changeset
20 ifndef HAS_SYSTEM_ASPRINTF
48
f66f0f27beae trunk: changeset 52
tuomov
parents: 44
diff changeset
21 SOURCES += snprintf_2.2/snprintf.c
72
7e69e5f7a013 trunk: changeset 1462
tuomov
parents: 71
diff changeset
22 DEFINES += -DHAVE_SNPRINTF
25
9d41e3611050 trunk: changeset 28
tuomov
parents: 23
diff changeset
23 else
28
01745c3150ad trunk: changeset 31
tuomov
parents: 27
diff changeset
24 DEFINES += -DHAS_SYSTEM_ASPRINTF
25
9d41e3611050 trunk: changeset 28
tuomov
parents: 23
diff changeset
25 endif
27
228f64ffb422 trunk: changeset 30
tuomov
parents: 25
diff changeset
26 endif
25
9d41e3611050 trunk: changeset 28
tuomov
parents: 23
diff changeset
27
0
86b7f6f9c5c0 Tailorization of trunk
tailor@f281.ttorni.ton.tut.fi
parents:
diff changeset
28 TARGETS=libtu.a
86b7f6f9c5c0 Tailorization of trunk
tailor@f281.ttorni.ton.tut.fi
parents:
diff changeset
29 TESTERS=tester tester2 tester3
86b7f6f9c5c0 Tailorization of trunk
tailor@f281.ttorni.ton.tut.fi
parents:
diff changeset
30
86b7f6f9c5c0 Tailorization of trunk
tailor@f281.ttorni.ton.tut.fi
parents:
diff changeset
31 ######################################
86b7f6f9c5c0 Tailorization of trunk
tailor@f281.ttorni.ton.tut.fi
parents:
diff changeset
32
102
c00694dbcde8 Updated locations of *.mk.
Tuomo Valkonen <tuomov@iki.fi>
parents: 97
diff changeset
33 include $(TOPDIR)/build/rules.mk
3
b1fbfab67908 trunk: changeset 6
tuomov
parents: 1
diff changeset
34
b1fbfab67908 trunk: changeset 6
tuomov
parents: 1
diff changeset
35 ######################################
0
86b7f6f9c5c0 Tailorization of trunk
tailor@f281.ttorni.ton.tut.fi
parents:
diff changeset
36
86b7f6f9c5c0 Tailorization of trunk
tailor@f281.ttorni.ton.tut.fi
parents:
diff changeset
37 testers: $(TESTERS)
86b7f6f9c5c0 Tailorization of trunk
tailor@f281.ttorni.ton.tut.fi
parents:
diff changeset
38
86b7f6f9c5c0 Tailorization of trunk
tailor@f281.ttorni.ton.tut.fi
parents:
diff changeset
39 libtu.a: $(OBJS)
9
55e7f2ff6021 trunk: changeset 12
tuomov
parents: 8
diff changeset
40 $(AR) $(ARFLAGS) $@ $+
29
a2715cff4288 trunk: changeset 32
tuomov
parents: 28
diff changeset
41 $(RANLIB) $@
a2715cff4288 trunk: changeset 32
tuomov
parents: 28
diff changeset
42
8
c1994196683f trunk: changeset 11
tuomov
parents: 5
diff changeset
43 tester: tester.c libtu.a
9
55e7f2ff6021 trunk: changeset 12
tuomov
parents: 8
diff changeset
44 $(CC) $(CFLAGS) $< -L. -ltu -lm -o $@
8
c1994196683f trunk: changeset 11
tuomov
parents: 5
diff changeset
45
c1994196683f trunk: changeset 11
tuomov
parents: 5
diff changeset
46 tester2: tester2.c libtu.a
9
55e7f2ff6021 trunk: changeset 12
tuomov
parents: 8
diff changeset
47 $(CC) $(CFLAGS) $< -L. -ltu -lm -o $@
8
c1994196683f trunk: changeset 11
tuomov
parents: 5
diff changeset
48
c1994196683f trunk: changeset 11
tuomov
parents: 5
diff changeset
49 tester3: tester3.c libtu.a
9
55e7f2ff6021 trunk: changeset 12
tuomov
parents: 8
diff changeset
50 $(CC) $(CFLAGS) $< -L. -ltu -lm -o $@
0
86b7f6f9c5c0 Tailorization of trunk
tailor@f281.ttorni.ton.tut.fi
parents:
diff changeset
51
3
b1fbfab67908 trunk: changeset 6
tuomov
parents: 1
diff changeset
52 _install:
23
5f8005150227 trunk: changeset 26
tuomov
parents: 16
diff changeset
53 $(INSTALLDIR) $(LIBDIR)
30
f7c7b419577e trunk: changeset 33
tuomov
parents: 29
diff changeset
54 $(INSTALLDIR) $(INCDIR)/libtu
3
b1fbfab67908 trunk: changeset 6
tuomov
parents: 1
diff changeset
55 $(INSTALL) -m $(DATA_MODE) libtu.a $(LIBDIR)
60
a4033700e35c trunk: changeset 1313
tuomov
parents: 58
diff changeset
56 for i in *.h; do \
30
f7c7b419577e trunk: changeset 33
tuomov
parents: 29
diff changeset
57 $(INSTALL) -m $(DATA_MODE) $$i $(INCDIR)/libtu; \
8
c1994196683f trunk: changeset 11
tuomov
parents: 5
diff changeset
58 done

mercurial