File: Makefile.subdir-sample

package info (click to toggle)
scratchbox2 2.2.4-1debian1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, wheezy
  • size: 5,392 kB
  • ctags: 5,239
  • sloc: ansic: 21,734; sh: 4,360; perl: 2,170; cpp: 1,913; makefile: 610; python: 184
file content (23 lines) | stat: -rw-r--r-- 846 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# beware of namespace collisions, all subdir makefiles are included
# into the top-level Makefile
objs := libsb2.o libsb_env.o sb_alien.o

# llep prefixes the arguments with $(LLPWD), which holds the "current"
# directory
sample: $(call llep,$(objs)
# depend on an archive from some other subdir
sample: lua/liblua_bindings.a

# now declare a little library of our own, use $(LLPWD) to avoid hard-coding
# path names

$(LLPWD)/liba.so: $(call llep,liba.o liba_aux.o)
	$(llbuild_link_shlib)
$(LLPWD)/liba.so: CFLAGS := $(CFLAGS) -fPIC -Wall -W -I$(TOPDIR)/lua/lua-5.1.1/src
$(LLPWD)/liba.so: LDFLAGS := $(LDFLAGS)
$(LLPWD)/liba.so: LIBS := -ldl -lm -lpthread -lrt 

# tell the toplevel about our target, be sure to append, not overwrite,
# targets variable's contents, use := to force expansion of $(LLPWD)
targets := $(targets) $(LLPWD)/liba.so