Help language development. Donate to The Perl Foundation

Algorithm::HierarchicalPAM cpan:TITSUKI last updated on 2019-12-29

src/Makefile.in
name = %hpam%
SRCS = hpam.c theta.c document.c util.c path.c phi.c
OBJS = $(SRCS:.c=.o)
HEADERS	= $(SRCS:.c=.h)
CCSHARED = %CCSHARED%
LDFLAGS = %LDFLAGS%

ifeq ($(OS),Windows_NT)
	detected_OS := Windows
else
	detected_OS := $(shell uname)
endif

ifeq ($(detected_OS), Linux)
	LDFLAGS += -lm
	CCSHARED += -shared
endif

ifeq ($(detected_OS), Darwin)
	CCSHARED += -dynamiclib -Wl,-commons,use_dylibs
endif

all: %DESTDIR%/resources/libraries/%hpam%

clean:
	rm %DESTDIR%/resources/libraries/%hpam%

%DESTDIR%/resources/libraries/%hpam%: $(OBJS)
	%CC% -std=c99 $(CCSHARED) %CCFLAGS% $(OBJS) -o [email protected]

%.o: %.c %.h
	%CC% -std=c99 %CCFLAGS% -c $<

%.d: %.c
	@set -e; rm -f [email protected]; \
	%CC% -std=c99 -M %CCFLAGS% $< > [email protected]$$$$; \
	sed 's,\($*\)\.o[ :]*,\1.o [email protected] : ,g' < [email protected]$$$$ > [email protected]; \
	rm -f [email protected]$$$$

-include $(SRCS:.c=.d)