File: Makefile

package info (click to toggle)
sfarklib 2.24-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 260 kB
  • sloc: cpp: 1,483; makefile: 76; sh: 50
file content (32 lines) | stat: -rw-r--r-- 908 bytes parent folder | download | duplicates (2)
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

INSTALL?=install

OBJECTS=sfklCoding.o sfklDiff.o sfklLPC.o sfklZip.o sfklCrunch.o sfklFile.o sfklString.o

ENDIANNESS=LITTLE_ENDIAN

CXXFLAGS+=-fPIC -D__$(ENDIANNESS)__ -Wall -Wextra

OS := $(shell uname)
ifeq ($(OS),Darwin)
LDFLAGS += -flat_namespace -undefined suppress -dynamiclib
SO = dylib
else 
LDFLAGS += -shared
SO = so
INSTALL += -D
endif

all: libsfark.$(SO).0.0.0

clean:
	-rm *.o libsfark.$(SO).0.0.0

libsfark.$(SO).0.0.0: $(OBJECTS)
	$(CXX) -shared $(LDFLAGS) -Wl,-soname,libsfark.$(SO).0 $(OBJECTS) -o libsfark.$(SO).0.0.0 -lz

install: libsfark.$(SO).0.0.0 sfArkLib.h
	$(INSTALL) libsfark.$(SO).0.0.0 $(DESTDIR)/usr/lib/${DEB_HOST_MULTIARCH}/libsfark.$(SO).0.0.0
	$(INSTALL) sfArkLib.h $(DESTDIR)/usr/include/sfArkLib.h
	ln -s libsfark.$(SO).0.0.0 $(DESTDIR)/usr/lib/${DEB_HOST_MULTIARCH}/libsfark.$(SO).0
	ln -s libsfark.$(SO).0.0.0 $(DESTDIR)/usr/lib/${DEB_HOST_MULTIARCH}/libsfark.$(SO)