Skip to content

Commit

Permalink
Makefile: add LDFLAGS for overriding link settings
Browse files Browse the repository at this point in the history
  • Loading branch information
keszybz committed Sep 12, 2013
1 parent bf2a0e4 commit 1c39a80
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ PROG = numatop
CC = gcc
LD = gcc
CFLAGS = -g -Wall -O2
LDFLAGS = -g
LDLIBS = -lncurses -lpthread -lnuma

COMMON_OBJS = cmd.o disp.o lwp.o numatop.o page.o perf.o \
Expand All @@ -18,7 +19,7 @@ INTEL_OBJS = wsm.o snb.o nhm.o
all: $(PROG)

$(PROG): $(COMMON_OBJS) $(OS_OBJS) $(INTEL_OBJS)
$(LD) -o $@ $(COMMON_OBJS) $(OS_OBJS) $(INTEL_OBJS) $(LDLIBS)
$(LD) $(LDFLAGS) -o $@ $(COMMON_OBJS) $(OS_OBJS) $(INTEL_OBJS) $(LDLIBS)

%.o: ./common/%.c ./common/include/*.h ./common/include/os/*.h
$(CC) $(CFLAGS) -o $@ -c $<
Expand Down

0 comments on commit 1c39a80

Please sign in to comment.