You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
pixz/Makefile

35 lines
627 B
Makefile

ifneq ($(shell gcc -v 2>&1 | grep 'Apple Inc'),)
APPLE=1
endif
LIBPREFIX = /Library/Fink/sl64 /opt/local
LDFLAGS = $(patsubst %,-L%/lib,$(LIBPREFIX)) -g -Wall
ifdef APPLE
ifeq ($(CC),gcc)
LDFLAGS += -search_paths_first
endif
endif
OPT = -g -O0
CFLAGS = $(patsubst %,-I%/include,$(LIBPREFIX)) $(OPT) -std=c99 \
-Wall -Wno-unknown-pragmas
CC = gcc
COMPILE = $(CC) $(CFLAGS) -c -o
LD = $(CC) $(LDFLAGS) -o
PROGS = write read list pread
COMMON = common.o endian.o cpu.o
all: $(PROGS)
%.o: %.c pixz.h
$(COMPILE) $@ $<
$(PROGS): %: %.o $(COMMON)
$(LD) $@ $^ -llzma -larchive
clean:
rm -f *.o $(PROGS)
.PHONY: all clean