Skip to content

Commit

Permalink
Add LDFLAGS support into makefile
Browse files Browse the repository at this point in the history
fix target rm in makefile
  • Loading branch information
fila43 committed Aug 29, 2023
1 parent 723db89 commit e1dc9f8
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,7 +1,8 @@
CFLAGS=-Wall -Wextra
all:db.cc convert_db.h convert.cc
g++ -Wall -Wextra convert.cc db.cc -llmdb -ldb -lgdbm -lgdbm_compat -o db_converter
g++ $(CFLAGS) convert.cc db.cc -llmdb -ldb -lgdbm -lgdbm_compat -o db_converter
static:db.cc convert_db.h convert.cc
g++ -Wall -Wextra convert.cc db.cc -llmdb -Wl,-Bstatic $(LDFLAGS) -ldb-5.3 -Wl,-Bdynamic -lgdbm -lgdbm_compat -o db_converter
g++ $(CFLAGS) convert.cc db.cc -llmdb -Wl,-Bstatic $(LDFLAGS) -ldb-5.3 -Wl,-Bdynamic -lgdbm -lgdbm_compat -o db_converter

clean:
rm -rf convert
rm -rf db_converter

0 comments on commit e1dc9f8

Please sign in to comment.