root/openpgpsdk/trunk/src/app/Makefile.template

Revision 606 (checked in by rachel, 5 years ago)

Use 64-bit flag on linking when requested

Line 
1 DM_FLAGS=%DM_FLAGS%
2 DM_LIB=%DM_LIB%
3 CC=%CC%
4
5 CFLAGS=-Wall -Werror -g $(DM_FLAGS) -I../../include %INCLUDES% %CFLAGS% -fPIC
6
7 LDFLAGS=-g %LDFLAGS%
8 LIBDEPS=../../lib/libops.a
9 LIBS=$(LIBDEPS) %CRYPTO_LIBS% %ZLIB% %OTHERLIBS% $(DM_LIB)
10 EXES=openpgp
11
12 all: Makefile headers .depend $(LIBDEPS) $(EXES)
13
14 headers:
15         (cd ../../include/openpgpsdk; $(MAKE) -w headers)
16
17 $(LIBDEPS):
18         (cd ..; $(MAKE) -w lib)
19
20 openpgp: openpgp.o $(LIBDEPS)
21         $(CC) $(LDFLAGS) -o openpgp openpgp.o $(LIBS)
22         cp openpgp ../../bin
23
24 tags:
25         rm -f TAGS
26         find . -name '*.[ch]' | xargs etags -a
27
28 clean:
29         rm -f openpgp *.o *.i
30         rm -f  TAGS
31
32 .depend: *.[ch] ../../include/openpgpsdk/*.h
33         $(CC) $(CFLAGS) -E -M *.c > .depend
34
35 force_depend:
36         $(CC) $(CFLAGS) -E -M *.c > .depend
37
38 Makefile: Makefile.template ../../configure
39         echo Makefile is older than templates, rerun configure.
40         exit 1
41
42 include .depend
Note: See TracBrowser for help on using the browser.