diff options
author | jaseg <code@jaseg.net> | 2015-07-07 02:49:51 +0200 |
---|---|---|
committer | jaseg <code@jaseg.net> | 2015-07-07 02:49:51 +0200 |
commit | 84dc917720ff12a741bf87824bef1e6c31c9e1f2 (patch) | |
tree | 0dd61b098bc8192dfcc7399db686926ff5a56442 /Makefile | |
parent | 5bd8c7dccaf04939fc8aa8b9a9aecdb56f2b9b91 (diff) | |
download | lolcat-84dc917720ff12a741bf87824bef1e6c31c9e1f2.tar.gz lolcat-84dc917720ff12a741bf87824bef1e6c31c9e1f2.tar.bz2 lolcat-84dc917720ff12a741bf87824bef1e6c31c9e1f2.zip |
Link statically against musl
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 14 |
1 files changed, 11 insertions, 3 deletions
@@ -1,11 +1,19 @@ all: lolcat -lolcat: lolcat.c fgetwc_fix.c - gcc -g -std=c99 -Wall -o lolcat lolcat.c fgetwc_fix.c +musl/lib/libc.a musl/lib/crt1.o: + cd musl; ./configure + make -C musl + +lolcat: lolcat.c musl/lib/libc.a musl/lib/crt1.o + gcc -c -std=c11 -Wall -Imusl/include -o lolcat.o lolcat.c + gcc -s -nostartfiles -nodefaultlibs -nostdinc -static -ffunction-sections -fdata-sections -Wl,--gc-sections -o lolcat lolcat.o musl/lib/crt1.o musl/lib/libc.a install: lolcat install lolcat /usr/local/bin -.PHONY: install all +clean: + rm -f lolcat lolcat.o + +.PHONY: install clean |