| 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 |