Artifact
624d386056a7cd131bed2f8b9fb1bfe1372640c2949de9fc8ea8dd58e9c07743 :
File
Makefile
— part of check-in
[a2696fb842]
at
2024-05-05 17:02:42
on branch trunk
— Add missing -static flag to static-logtodb build target, as reported in the forum.
(user:
stephan
size: 1607)
[more...]
0000: 23 20 4d 61 6b 65 66 69 6c 65 20 66 6f 72 20 61 # Makefile for a
0010: 6c 74 68 74 74 70 64 20 61 6e 64 20 75 74 69 6c lthttpd and util
0020: 69 74 69 65 73 2e 20 20 53 75 6d 6d 61 72 79 20 ities. Summary
0030: 6f 66 20 74 61 72 67 65 74 73 3a 0a 23 0a 23 20 of targets:.#.#
0040: 20 20 20 6d 61 6b 65 20 61 6c 74 68 74 74 70 64 make althttpd
0050: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
0060: 20 3c 2d 2d 20 20 61 6c 74 68 74 74 70 64 20 77 <-- althttpd w
0070: 69 74 68 6f 75 74 20 4f 70 65 6e 53 53 4c 0a 23 ithout OpenSSL.#
0080: 20 20 20 20 6d 61 6b 65 20 61 6c 74 68 74 74 70 make althttp
0090: 73 64 20 20 20 20 20 20 20 20 20 20 20 20 20 20 sd
00a0: 20 20 3c 2d 2d 20 20 61 6c 74 68 74 74 70 64 20 <-- althttpd
00b0: 69 6e 63 6c 75 64 69 6e 67 20 4f 70 65 6e 53 53 including OpenSS
00c0: 4c 20 66 6f 72 20 54 4c 53 20 73 75 70 70 6f 72 L for TLS suppor
00d0: 74 0a 23 20 20 20 20 6d 61 6b 65 20 73 74 61 74 t.# make stat
00e0: 69 63 2d 61 6c 74 68 74 74 70 64 20 20 20 20 20 ic-althttpd
00f0: 20 20 20 20 20 3c 2d 2d 20 20 73 74 61 74 69 63 <-- static
0100: 61 6c 6c 79 20 6c 69 6e 6b 65 64 20 76 65 72 73 ally linked vers
0110: 69 6f 6e 20 6f 66 20 61 6c 74 68 74 74 70 64 0a ion of althttpd.
0120: 23 20 20 20 20 6d 61 6b 65 20 73 74 61 74 69 63 # make static
0130: 2d 61 6c 74 68 74 74 70 73 64 20 20 20 20 20 20 -althttpsd
0140: 20 20 20 3c 2d 2d 20 20 73 74 61 74 69 63 61 6c <-- statical
0150: 6c 79 20 6c 69 6e 6b 65 64 20 76 65 72 73 69 6f ly linked versio
0160: 6e 20 6f 66 20 61 6c 74 68 74 74 70 73 64 0a 23 n of althttpsd.#
0170: 20 20 20 20 6d 61 6b 65 20 6c 6f 67 74 6f 64 62 make logtodb
0180: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
0190: 20 20 3c 2d 2d 20 20 50 72 6f 67 72 61 6d 20 74 <-- Program t
01a0: 6f 20 62 75 69 6c 64 20 53 51 4c 69 74 65 20 64 o build SQLite d
01b0: 61 74 61 62 61 73 65 20 66 72 6f 6d 20 6c 6f 67 atabase from log
01c0: 20 66 69 6c 65 0a 23 20 20 20 20 6d 61 6b 65 20 file.# make
01d0: 73 74 61 74 69 63 2d 6c 6f 67 74 6f 64 62 20 20 static-logtodb
01e0: 20 20 20 20 20 20 20 20 20 3c 2d 2d 20 20 53 74 <-- St
01f0: 61 74 69 63 61 6c 6c 79 20 6c 69 6e 6b 65 64 20 atically linked
0200: 76 65 72 73 69 6f 6e 20 6f 66 20 74 68 65 20 73 version of the s
0210: 61 6d 65 0a 23 0a 64 65 66 61 75 6c 74 3a 20 61 ame.#.default: a
0220: 6c 74 68 74 74 70 64 20 61 6c 74 68 74 74 70 73 lthttpd althttps
0230: 64 0a 43 43 3d 63 63 0a 43 46 4c 41 47 53 3d 2d d.CC=cc.CFLAGS=-
0240: 4f 73 20 2d 57 61 6c 6c 20 2d 57 65 78 74 72 61 Os -Wall -Wextra
0250: 20 2d 49 2e 0a 0a 56 45 52 53 49 4f 4e 2e 68 3a -I...VERSION.h:
0260: 09 56 45 52 53 49 4f 4e 20 6d 61 6e 69 66 65 73 .VERSION manifes
0270: 74 20 6d 61 6e 69 66 65 73 74 2e 75 75 69 64 20 t manifest.uuid
0280: 6d 6b 76 65 72 73 69 6f 6e 2e 63 0a 09 24 28 43 mkversion.c..$(C
0290: 43 29 20 2d 6f 20 6d 6b 76 65 72 73 69 6f 6e 20 C) -o mkversion
02a0: 6d 6b 76 65 72 73 69 6f 6e 2e 63 0a 09 2e 2f 6d mkversion.c.../m
02b0: 6b 76 65 72 73 69 6f 6e 20 6d 61 6e 69 66 65 73 kversion manifes
02c0: 74 2e 75 75 69 64 20 6d 61 6e 69 66 65 73 74 20 t.uuid manifest
02d0: 56 45 52 53 49 4f 4e 20 3e 56 45 52 53 49 4f 4e VERSION >VERSION
02e0: 2e 68 0a 0a 61 6c 74 68 74 74 70 64 3a 09 61 6c .h..althttpd:.al
02f0: 74 68 74 74 70 64 2e 63 20 56 45 52 53 49 4f 4e thttpd.c VERSION
0300: 2e 68 0a 09 24 28 43 43 29 20 24 28 43 46 4c 41 .h..$(CC) $(CFLA
0310: 47 53 29 20 2d 6f 20 61 6c 74 68 74 74 70 64 20 GS) -o althttpd
0320: 61 6c 74 68 74 74 70 64 2e 63 0a 0a 61 6c 74 68 althttpd.c..alth
0330: 74 74 70 73 64 3a 09 61 6c 74 68 74 74 70 64 2e ttpsd:.althttpd.
0340: 63 20 56 45 52 53 49 4f 4e 2e 68 0a 09 24 28 43 c VERSION.h..$(C
0350: 43 29 20 24 28 43 46 4c 41 47 53 29 20 2d 66 50 C) $(CFLAGS) -fP
0360: 49 43 20 2d 6f 20 61 6c 74 68 74 74 70 73 64 20 IC -o althttpsd
0370: 2d 44 45 4e 41 42 4c 45 5f 54 4c 53 20 61 6c 74 -DENABLE_TLS alt
0380: 68 74 74 70 64 2e 63 20 2d 6c 73 73 6c 20 2d 6c httpd.c -lssl -l
0390: 63 72 79 70 74 6f 0a 0a 73 74 61 74 69 63 2d 61 crypto..static-a
03a0: 6c 74 68 74 74 70 64 3a 09 61 6c 74 68 74 74 70 lthttpd:.althttp
03b0: 64 2e 63 20 56 45 52 53 49 4f 4e 2e 68 0a 09 24 d.c VERSION.h..$
03c0: 28 43 43 29 20 24 28 43 46 4c 41 47 53 29 20 2d (CC) $(CFLAGS) -
03d0: 73 74 61 74 69 63 20 2d 6f 20 73 74 61 74 69 63 static -o static
03e0: 2d 61 6c 74 68 74 74 70 64 20 61 6c 74 68 74 74 -althttpd althtt
03f0: 70 64 2e 63 0a 0a 73 74 61 74 69 63 2d 61 6c 74 pd.c..static-alt
0400: 68 74 74 70 73 64 3a 09 61 6c 74 68 74 74 70 64 httpsd:.althttpd
0410: 2e 63 20 56 45 52 53 49 4f 4e 2e 68 0a 09 24 28 .c VERSION.h..$(
0420: 43 43 29 20 24 28 43 46 4c 41 47 53 29 20 2d 73 CC) $(CFLAGS) -s
0430: 74 61 74 69 63 20 2d 66 50 49 43 20 2d 6f 20 73 tatic -fPIC -o s
0440: 74 61 74 69 63 2d 61 6c 74 68 74 74 70 73 64 20 tatic-althttpsd
0450: 2d 44 45 4e 41 42 4c 45 5f 54 4c 53 20 61 6c 74 -DENABLE_TLS alt
0460: 68 74 74 70 64 2e 63 20 2d 6c 73 73 6c 20 2d 6c httpd.c -lssl -l
0470: 63 72 79 70 74 6f 20 2d 6c 70 74 68 72 65 61 64 crypto -lpthread
0480: 20 2d 6c 64 6c 0a 0a 73 71 6c 69 74 65 33 2e 6f -ldl..sqlite3.o
0490: 3a 09 73 71 6c 69 74 65 33 2e 63 0a 09 24 28 43 :.sqlite3.c..$(C
04a0: 43 29 20 24 28 43 46 4c 41 47 53 29 20 2d 44 53 C) $(CFLAGS) -DS
04b0: 51 4c 49 54 45 5f 4f 4d 49 54 5f 4c 4f 41 44 5f QLITE_OMIT_LOAD_
04c0: 45 58 54 45 4e 53 49 4f 4e 20 2d 44 53 51 4c 49 EXTENSION -DSQLI
04d0: 54 45 5f 54 48 52 45 41 44 53 41 46 45 3d 30 20 TE_THREADSAFE=0
04e0: 2d 63 20 2d 6f 20 73 71 6c 69 74 65 33 2e 6f 20 -c -o sqlite3.o
04f0: 73 71 6c 69 74 65 33 2e 63 0a 0a 73 74 61 74 69 sqlite3.c..stati
0500: 63 2d 6c 6f 67 74 6f 64 62 3a 09 6c 6f 67 74 6f c-logtodb:.logto
0510: 64 62 2e 63 20 73 71 6c 69 74 65 33 2e 6f 20 56 db.c sqlite3.o V
0520: 45 52 53 49 4f 4e 2e 68 0a 09 24 28 43 43 29 20 ERSION.h..$(CC)
0530: 24 28 43 46 4c 41 47 53 29 20 2d 73 74 61 74 69 $(CFLAGS) -stati
0540: 63 20 2d 6f 20 73 74 61 74 69 63 2d 6c 6f 67 74 c -o static-logt
0550: 6f 64 62 20 6c 6f 67 74 6f 64 62 2e 63 20 73 71 odb logtodb.c sq
0560: 6c 69 74 65 33 2e 6f 0a 0a 6c 6f 67 74 6f 64 62 lite3.o..logtodb
0570: 3a 09 6c 6f 67 74 6f 64 62 2e 63 20 56 45 52 53 :.logtodb.c VERS
0580: 49 4f 4e 2e 68 0a 09 24 28 43 43 29 20 24 28 43 ION.h..$(CC) $(C
0590: 46 4c 41 47 53 29 20 2d 6f 20 6c 6f 67 74 6f 64 FLAGS) -o logtod
05a0: 62 20 6c 6f 67 74 6f 64 62 2e 63 20 2d 6c 73 71 b logtodb.c -lsq
05b0: 6c 69 74 65 33 20 2d 6c 6d 20 2d 6c 64 6c 20 2d lite3 -lm -ldl -
05c0: 6c 70 74 68 72 65 61 64 0a 0a 63 6c 65 61 6e 3a lpthread..clean:
05d0: 0a 09 72 6d 20 2d 66 20 61 6c 74 68 74 74 70 64 ..rm -f althttpd
05e0: 20 61 6c 74 68 74 74 70 73 64 20 56 45 52 53 49 althttpsd VERSI
05f0: 4f 4e 2e 68 20 73 71 6c 69 74 65 33 2e 6f 20 73 ON.h sqlite3.o s
0600: 74 61 74 69 63 2d 61 6c 74 68 74 74 70 64 20 5c tatic-althttpd \
0610: 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 73 . s
0620: 74 61 74 69 63 2d 61 6c 74 68 74 74 70 73 64 20 tatic-althttpsd
0630: 6c 6f 67 74 6f 64 62 20 73 74 61 74 69 63 2d 6c logtodb static-l
0640: 6f 67 74 6f 64 62 0a ogtodb.