Menu

[r2891]: / trunk / documentation / libelf-by-example / Makefile  Maximize  Restore  History

Download this file

29 lines (22 with data), 605 Bytes

 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
#
# Libelf by Example
#
# $Id$
TOP = ../..
DOC= libelf-by-example
SRCS= libelf-by-example.tex prog1.txt prog2.txt prog3.txt \
prog4.txt prog5.txt prog6.txt
.include "${TOP}/mk/elftoolchain.tex.mk"
.if ${OS_HOST} == "Linux"
EXTRA_LIBS= -lbsd
.endif
check-example-syntax: .PHONY
.for f in ${SRCS:Mprog*}
@c=$$(basename ${f} .txt).c; sed -e 's/@[^@]*@//' \
${.CURDIR}/${f} > ${.OBJDIR}/$${c}; \
echo -n $${c} ' '; cc -I${.CURDIR}/${TOP}/common \
-I${.CURDIR}/${TOP}/libelf ${.OBJDIR}/$${c} \
-L${.CURDIR}/${TOP}/libelf -lelf ${EXTRA_LIBS} && \
rm ${.OBJDIR}/$${c} a.out
.endfor
@echo
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.