summaryrefslogtreecommitdiff
path: root/doc/examples/integration-commands/files/libhello/Makefile
blob: 63ee1106908bc557f6904028d6bb0e29eda57dba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# Sample makefile for hello library
#
.PHONY: all install

all: libhello.so

install:
	install -d ${DESTDIR}${PREFIX}/lib
	install -d ${DESTDIR}${PREFIX}/include
	install -m 644 libhello.so ${DESTDIR}${PREFIX}/lib
	install -m 644 libhello.h ${DESTDIR}${PREFIX}/include

%.o: %.c %.h
	$(CC) -c $< -o $@ -Wall

libhello.so: libhello.o
	$(CC) -shared -o $@ $<