# libmissing Makefile

include ../../config.mak

.PHONY: all clean install

SRCS = getopt.c inet_ntop.c ipv6_missing.c snprintf.c strsep.c vasprintf.c
OBJS = $(SRCS:.c=.o)

STATIC_LIB = libmissing.a
AR = ar
CC = gcc
CFLAGS= -O2 -pipe
INTERNAL_CFLAGS = -Wall -I.. -I. -fno-strict-aliasing
CPPFLAGS += -MMD -MP -MT $@
LIBS = -lncurses

INSTALL=/usr/bin/install
INSTALL_PREFIX=/usr/local

EXE = ncic

all: $(STATIC_LIB)

$(STATIC_LIB): Makefile $(OBJS)
	$(AR) rc $(STATIC_LIB) $(OBJS)
	ranlib $(STATIC_LIB)

install:
	$(INSTALL) -s -m 755 $(EXE) $(INSTALL_PREFIX)/bin

clean:
	rm -f $(OBJS) $(STATIC_LIB)
	rm -f *.d

.c.o:
	$(CC) $(INTERNAL_CFLAGS) $(CFLAGS) $(CPPFLAGS) -o $@ -c $<

# Include automatically generated dependency files
-include $(wildcard *.d)



