2
0
mirror of https://github.com/vasi/pixz synced 2024-11-18 15:26:46 +00:00

Makefile cleanup

This commit is contained in:
Dave Vasilevsky 2012-11-05 01:14:59 -05:00
parent 0aa5ae7d1a
commit e20c330366
2 changed files with 13 additions and 10 deletions

View File

@ -2,22 +2,23 @@ ifneq ($(shell gcc -v 2>&1 | grep 'Apple Inc'),)
APPLE=1
endif
ifdef APPLE
ifeq ($(CC),gcc)
LDFLAGS += -search_paths_first
endif
endif
OPT = -g -O0
CFLAGS = $(patsubst %,-I%/include,$(LIBPREFIX)) $(OPT) -std=gnu99 \
MYCFLAGS = $(patsubst %,-I%/include,$(LIBPREFIX)) $(OPT) -std=gnu99 \
-Wall -Wno-unknown-pragmas
LDFLAGS = $(patsubst %,-L%/lib,$(LIBPREFIX)) $(OPT) -Wall
MYLDFLAGS = $(patsubst %,-L%/lib,$(LIBPREFIX)) $(OPT) -Wall
THREADS = -lpthread
LIBADD = $(THREADS) -llzma -larchive
CC = gcc
COMPILE = $(CC) $(CFLAGS) -c -o
LD = $(CC) $(LDFLAGS) -o
COMPILE = $(CC) $(MYCFLAGS) $(CFLAGS) -c -o
LD = $(CC) $(MYLDFLAGS) $(LDFLAGS) -o
ifdef APPLE
ifeq ($(CC),gcc)
MYLDFLAGS += -search_paths_first
endif
endif
PROGS = pixz
COMMON = common.o endian.o cpu.o read.o write.o list.o

4
pixz.h
View File

@ -20,7 +20,9 @@
#define CHUNKSIZE 4096
#define DEBUG 0
#ifndef DEBUG
#define DEBUG 0
#endif
#if DEBUG
#define debug(str, ...) fprintf(stderr, str "\n", ##__VA_ARGS__)
#else