blob: 00d99fcd26877a184b2d4fb9aabf2da50d1a405e [file] [log] [blame]
CC = gcc
CFLAGS = -Wall -g
NLLIBNAME = libnl-1
LIBTCMD_DIR := ../libtcmd
PREFIX ?= /usr
SBINDIR ?= $(PREFIX)/sbin
INSTALL ?= install
override LDLIBS += $(shell pkg-config --libs $(NLLIBNAME)) -lrt -ltcmd -lm
override CFLAGS += $(shell pkg-config --cflags $(NLLIBNAME)) -I$(LIBTCMD_DIR) -L$(LIBTCMD_DIR)
all:
$(MAKE) athtestcmd
$(MAKE) psatUtil
athtestcmd: athtestcmd.c athtestcmd.h testcmd.h sinit_common.h sinit_common.c sinit_eep.h
$(MAKE) -C $(LIBTCMD_DIR)
$(CC) $(CFLAGS) -o $@ $^ $(LDLIBS)
psatUtil: psatUtil.c athtestcmd.h testcmd.h sinit_common.h sinit_common.c
$(CC) $(CFLAGS) -o $@ $^ $(LDLIBS)
install: psatUtil athtestcmd
install -m 755 psatUtil $(DESTDIR)$(SBINDIR)
install -m 755 athtestcmd $(DESTDIR)$(SBINDIR)
clean:
rm -f athtestcmd
rm -f psatUtil