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

42 lines
745 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
CFLAGS = $(patsubst %,-I%/include,$(LIBPREFIX)) -g -O0 -std=c99 \
-Wall -Wno-unknown-pragmas
15 years ago
CC = gcc
COMPILE = $(CC) $(CFLAGS) -c -o
LD = $(CC) $(LDFLAGS) -o
PROGS = write read list
all: $(PROGS)
%.o: %.c pixz.h
$(COMPILE) $@ $<
list: list.o common.o endian.o
$(LD) $@ $^ -llzma
write: write.o common.o endian.o cpu.o
15 years ago
$(LD) $@ $^ -larchive -llzma
read: read.o common.o endian.o
$(LD) $@ $^ -llzma
pread: pread.o common.o endian.o
$(LD) $@ $^ -llzma
15 years ago
clean:
rm -f *.o $(PROGS)
15 years ago
.PHONY: all clean