mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-17 08:40:14 +02:00
nvmutil: move lib files to lib/
only keep nvmutil.c in main Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
+32
-28
@@ -27,15 +27,15 @@ PROG = nvmutil
|
|||||||
|
|
||||||
OBJS = \
|
OBJS = \
|
||||||
obj/nvmutil.o \
|
obj/nvmutil.o \
|
||||||
obj/state.o \
|
obj/lib/state.o \
|
||||||
obj/file.o \
|
obj/lib/file.o \
|
||||||
obj/string.o \
|
obj/lib/string.o \
|
||||||
obj/usage.o \
|
obj/lib/usage.o \
|
||||||
obj/command.o \
|
obj/lib/command.o \
|
||||||
obj/num.o \
|
obj/lib/num.o \
|
||||||
obj/io.o \
|
obj/lib/io.o \
|
||||||
obj/checksum.o \
|
obj/lib/checksum.o \
|
||||||
obj/word.o
|
obj/lib/word.o
|
||||||
|
|
||||||
# default mode
|
# default mode
|
||||||
CFLAGS_MODE = $(PORTABLE)
|
CFLAGS_MODE = $(PORTABLE)
|
||||||
@@ -52,35 +52,39 @@ $(OBJS): obj
|
|||||||
obj:
|
obj:
|
||||||
mkdir obj || true
|
mkdir obj || true
|
||||||
|
|
||||||
|
# main program object
|
||||||
|
|
||||||
obj/nvmutil.o: nvmutil.c
|
obj/nvmutil.o: nvmutil.c
|
||||||
$(CC_MODE) $(CFLAGS_MODE) -c nvmutil.c -o obj/nvmutil.o
|
$(CC_MODE) $(CFLAGS_MODE) -c nvmutil.c -o obj/nvmutil.o
|
||||||
|
|
||||||
obj/state.o: state.c
|
# library/helper objects
|
||||||
$(CC_MODE) $(CFLAGS_MODE) -c state.c -o obj/state.o
|
|
||||||
|
|
||||||
obj/file.o: file.c
|
obj/lib/state.o: lib/state.c
|
||||||
$(CC_MODE) $(CFLAGS_MODE) -c file.c -o obj/file.o
|
$(CC_MODE) $(CFLAGS_MODE) -c lib/state.c -o obj/lib/state.o
|
||||||
|
|
||||||
obj/string.o: string.c
|
obj/lib/file.o: lib/file.c
|
||||||
$(CC_MODE) $(CFLAGS_MODE) -c string.c -o obj/string.o
|
$(CC_MODE) $(CFLAGS_MODE) -c lib/file.c -o obj/lib/file.o
|
||||||
|
|
||||||
obj/usage.o: usage.c
|
obj/lib/string.o: lib/string.c
|
||||||
$(CC_MODE) $(CFLAGS_MODE) -c usage.c -o obj/usage.o
|
$(CC_MODE) $(CFLAGS_MODE) -c lib/string.c -o obj/lib/string.o
|
||||||
|
|
||||||
obj/command.o: command.c
|
obj/lib/usage.o: lib/usage.c
|
||||||
$(CC_MODE) $(CFLAGS_MODE) -c command.c -o obj/command.o
|
$(CC_MODE) $(CFLAGS_MODE) -c lib/usage.c -o obj/lib/usage.o
|
||||||
|
|
||||||
obj/num.o: num.c
|
obj/lib/command.o: lib/command.c
|
||||||
$(CC_MODE) $(CFLAGS_MODE) -c num.c -o obj/num.o
|
$(CC_MODE) $(CFLAGS_MODE) -c lib/command.c -o obj/lib/command.o
|
||||||
|
|
||||||
obj/io.o: io.c
|
obj/lib/num.o: lib/num.c
|
||||||
$(CC_MODE) $(CFLAGS_MODE) -c io.c -o obj/io.o
|
$(CC_MODE) $(CFLAGS_MODE) -c lib/num.c -o obj/lib/num.o
|
||||||
|
|
||||||
obj/checksum.o: checksum.c
|
obj/lib/io.o: lib/io.c
|
||||||
$(CC_MODE) $(CFLAGS_MODE) -c checksum.c -o obj/checksum.o
|
$(CC_MODE) $(CFLAGS_MODE) -c lib/io.c -o obj/lib/io.o
|
||||||
|
|
||||||
obj/word.o: word.c
|
obj/lib/checksum.o: lib/checksum.c
|
||||||
$(CC_MODE) $(CFLAGS_MODE) -c word.c -o obj/word.o
|
$(CC_MODE) $(CFLAGS_MODE) -c lib/checksum.c -o obj/lib/checksum.o
|
||||||
|
|
||||||
|
obj/lib/word.o: lib/word.c
|
||||||
|
$(CC_MODE) $(CFLAGS_MODE) -c lib/word.c -o obj/lib/word.o
|
||||||
|
|
||||||
# install
|
# install
|
||||||
|
|
||||||
@@ -93,7 +97,7 @@ uninstall:
|
|||||||
rm -f $(DESTDIR)$(PREFIX)/bin/$(PROG)
|
rm -f $(DESTDIR)$(PREFIX)/bin/$(PROG)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f $(PROG) $(OBJS) *.d
|
rm -f $(PROG) $(OBJS)
|
||||||
|
|
||||||
distclean: clean
|
distclean: clean
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "include/common.h"
|
#include "../include/common.h"
|
||||||
|
|
||||||
void
|
void
|
||||||
read_checksums(void)
|
read_checksums(void)
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "include/common.h"
|
#include "../include/common.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Guard against regressions by maintainers (command table)
|
* Guard against regressions by maintainers (command table)
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "include/common.h"
|
#include "../include/common.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* TODO: make generic. S_ISREG: check every other
|
* TODO: make generic. S_ISREG: check every other
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "include/common.h"
|
#include "../include/common.h"
|
||||||
|
|
||||||
void
|
void
|
||||||
open_gbe_file(void)
|
open_gbe_file(void)
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "include/common.h"
|
#include "../include/common.h"
|
||||||
|
|
||||||
unsigned short
|
unsigned short
|
||||||
hextonum(char ch_s)
|
hextonum(char ch_s)
|
||||||
@@ -31,7 +31,7 @@
|
|||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "include/common.h"
|
#include "../include/common.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Program state/command table
|
* Program state/command table
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "include/common.h"
|
#include "../include/common.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Portable strcmp() but blocks NULL/empty/unterminated
|
* Portable strcmp() but blocks NULL/empty/unterminated
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "include/common.h"
|
#include "../include/common.h"
|
||||||
|
|
||||||
void
|
void
|
||||||
usage(void)
|
usage(void)
|
||||||
@@ -23,7 +23,7 @@
|
|||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "include/common.h"
|
#include "../include/common.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* GbE NVM files store 16-bit (2-byte) little-endian words.
|
* GbE NVM files store 16-bit (2-byte) little-endian words.
|
||||||
Reference in New Issue
Block a user