File: Makefile

package info (click to toggle)
android-platform-build 21-4
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 4,204 kB
  • ctags: 3,464
  • sloc: python: 3,797; cpp: 2,788; cs: 1,971; sh: 1,302; makefile: 1,114; ansic: 917; java: 734
file content (32 lines) | stat: -rw-r--r-- 752 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/make

CC = gcc

# the sources are: CopyFile.c and pseudolocalize.cpp
OBJECTS = CopyFile.o pseudolocalize.o

ALL_CFLAGS = -fPIC -Iinclude \
        -DANDROID_SMP=0 \
		-include /usr/include/android/arch/linux-x86/AndroidConfig.h
ALL_LDFLAGS = -fPIC -shared -rdynamic -Wl,-rpath=/usr/lib/android
ALL_LIBS =

CFLAGS := $(ALL_CFLAGS) $(CFLAGS)
CXXFLAGS := $(ALL_CFLAGS) $(CXXFLAGS)
LDFLAGS := $(ALL_LDFLAGS) $(LDFLAGS)
LIBS := $(ALL_LIBS) $(LIBS)

LIBNAME = libhost

all: $(LIBNAME).so.0.21.0 $(LIBNAME).a

$(LIBNAME).so.0.21.0: $(OBJECTS)
	$(CXX) $(LDFLAGS) -Wl,-soname,$(LIBNAME).so.0 -o $(LIBNAME).so.0.21.0 $(OBJECTS) $(LIBS)

$(LIBNAME).a: $(OBJECTS)
	ar rs $(LIBNAME).a $(OBJECTS)

clean:
	rm -f $(OBJECTS)
	rm -f $(LIBNAME).so* $(LIBNAME).a