stash makefile before automake

This commit is contained in:
Kyle Isom 2020-02-11 20:17:39 -08:00
parent a2af41e2a4
commit 0d8053dc20
1 changed files with 12 additions and 8 deletions

View File

@ -2,8 +2,9 @@ BINS := srm
EDS := ke kte
LIBS := libdirutils.a libiniparser.a
LDFLAGS :=
CFLAGS := -pedantic -Wall -Werror -Wextra -O0 -std=c99 -g -I../include/
LDFLAGS := -L. -L/usr/local/lib
CFLAGS := -pedantic -Wall -Werror -Wextra -O0 -std=c99 -g
CFLAGS += -I../include/ -I/usr/local/include/
.PHONY: all
all: $(BINS) $(EDS) $(LIBS)
@ -22,15 +23,18 @@ srm: srm.c
libiniparser.a: iniparser.o
$(AR) -rcs $@ iniparser.o
iniparser-test: iniparser_test.c libiniparser.a
$(CC) $(CFLAGS) -o $@ iniparser_test.c libiniparser.a
libdirutils.a: dirlist.o dirutils.o dirwalk.o
$(AR) -rcs $@ dirlist.o dirutils.o dirwalk.o
.PHONY: tests
tests: iniparser-test dirlist-test dirutils-test
iniparser-test: iniparser_test.c libiniparser.a
$(CC) $(CFLAGS) -o $@ iniparser_test.c libiniparser.a
dirlist-test: dirlist_test.c libdirutils.a
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ dirlist_test.c libdirutils.a
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ dirlist_test.c libdirutils.a -lcunit
dirutils-test: dirutils_test.c libdirutils.a
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ dirutils_test.c libdirutils.a
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ dirutils_test.c libdirutils.a -lcunit