From 32c34ab174f1dd93985831926241ed3f20f4d0c7 Mon Sep 17 00:00:00 2001 From: jaseg Date: Sun, 22 Jul 2018 18:38:00 +0200 Subject: Remove fmemopen altogether since it just doesn't work. Closes #9. --- Makefile | 38 ++++++++++---------------------------- 1 file changed, 10 insertions(+), 28 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 1cd5cc8..1be84e5 100644 --- a/Makefile +++ b/Makefile @@ -1,43 +1,25 @@ +CC ?= gcc LOLCAT_SRC ?= lolcat.c CENSOR_SRC ?= censor.c -CFLAGS ?= -std=c11 -Wall -g +CFLAGS ?= -std=c11 -Wall -Wextra -g DESTDIR ?= /usr/local/bin -all: lolcat-static censor-static +all: lolcat censor -include Makefile.musl - -ifeq ($(shell uname -s),Darwin) - LOLCAT_SRC += memorymapping/src/fmemopen.c - CENSOR_SRC += memorymapping/src/fmemopen.c - CFLAGS += -Imemorymapping/src -endif - -.PHONY: install clean static - -static: lolcat-static censor-static - -lolcat-static: lolcat.c - gcc -c $(CFLAGS) -I$(MUSLDIR)/include -o lolcat.o $< - gcc -s -nostartfiles -nodefaultlibs -nostdinc -static -ffunction-sections -fdata-sections -Wl,--gc-sections -o $@ lolcat.o $(MUSLDIR)/lib/crt1.o $(MUSLDIR)/lib/libc.a - -censor-static: censor.c - gcc -c $(CFLAGS) -I$(MUSLDIR)/include -o censor.o $< - gcc -s -nostartfiles -nodefaultlibs -nostdinc -static -ffunction-sections -fdata-sections -Wl,--gc-sections -o $@ censor.o $(MUSLDIR)/lib/crt1.o $(MUSLDIR)/lib/libc.a +.PHONY: install clean lolcat: $(LOLCAT_SRC) - gcc $(CFLAGS) -o $@ $^ + $(CC) $(CFLAGS) -o $@ $^ censor: $(CENSOR_SRC) - gcc $(CFLAGS) -o $@ $^ + $(CC) $(CFLAGS) -o $@ $^ -install: lolcat-static censor-static - install lolcat-static $(DESTDIR)/lolcat - install censor-static $(DESTDIR)/censor +install: lolcat censor + install lolcat $(DESTDIR)/lolcat + install censor $(DESTDIR)/censor clean: - rm -f lolcat lolcat-static.o lolcat-static censor censor-static.o censor-static - # make -C musl clean + rm -f lolcat censor -- cgit