Skip to content

Commit

Permalink
Allow appending cflags from CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
dangarbri committed Sep 2, 2024
1 parent 43f1f75 commit e771c33
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
CFLAGS=-Wall -g
_CFLAGS = -Wall -g
OBJECTS=main.o ecb_extract.o sql.o

.PHONY: all clean install

all: save_edna

save_edna: ${OBJECTS}
$(CC) $^ -o $@
$(CC) ${CFLAGS} ${_CFLAGS} $^ -o $@

%.o: %.c
$(CC) ${CFLAGS} -o $@ -c $<
$(CC) ${CFLAGS} ${_CFLAGS} -o $@ -c $<

clean:
rm *.o
rm save_edna

install: save_edna
cp $< /usr/local/bin
Expand Down

0 comments on commit e771c33

Please sign in to comment.