33 lines
508 B
Makefile
33 lines
508 B
Makefile
|
DESTDIR ?=
|
||
|
PREFIX ?= /usr/local
|
||
|
EXEC_PREFIX ?= $(PREFIX)
|
||
|
BINDIR ?= $(DESTDIR)$(EXEC_PREFIX)/bin
|
||
|
|
||
|
CFLAGS += -Os -g -Wall -Wextra -pedantic
|
||
|
CPPFLAGS +=
|
||
|
LDFLAGS +=
|
||
|
|
||
|
.SUFFIXES:
|
||
|
.SUFFIXES: .c .o
|
||
|
|
||
|
.PHONY: all install uninstall clean distclean
|
||
|
|
||
|
all: ethertype-dump
|
||
|
|
||
|
ethertype-dump: ethertype-dump.o
|
||
|
$(CC) -o $@ $< $(LDFLAGS)
|
||
|
|
||
|
.c.o:
|
||
|
$(CC) -c $(CFLAGS) $(CPPFLAGS) -o $@ $<
|
||
|
|
||
|
install: all
|
||
|
install ethertype-dump $(BINDIR)
|
||
|
|
||
|
uninstall:
|
||
|
rm $(BINDIR)/ethertype-dump
|
||
|
|
||
|
clean:
|
||
|
rm -f ethertype-dump *.o
|
||
|
|
||
|
distclean: clean
|