Use binary extension during gkrellm build

Honor the BINEXT variable in the gkrellm and gkrellmd target to enforce
building with the correct extension. This is needed for recent mingw-w64
cross toolchains since those do not automatically append ".exe" when
linking.
This commit is contained in:
Stefan Gehn 2014-04-18 09:23:07 +02:00
parent 3a487e3271
commit eb0ded8d55
2 changed files with 10 additions and 8 deletions

View File

@ -113,10 +113,10 @@ OS_RELEASE=$(shell uname -r)
OBJS = main.o monitor.o mail.o plugins.o glib.o utils.o sysdeps-unix.o log.o
all: gkrellmd
all: gkrellmd$(BINEXT)
gkrellmd: $(OBJS) $(EXTRAOBJS)
$(CC) $(OBJS) $(EXTRAOBJS) -o gkrellmd \
gkrellmd$(BINEXT): $(OBJS) $(EXTRAOBJS)
$(CC) $(OBJS) $(EXTRAOBJS) -o $@ \
$(LDFLAGS) $(LIBS) $(LINK_FLAGS)
static: $(OBJS) $(EXTRAOBJS)
@ -170,11 +170,12 @@ endif
windows: libgkrellmd.a
$(MAKE) \
BINEXT=".exe" \
CFLAGS="${CFLAGS} -D_WIN32_WINNT=0x0501 -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN" \
LINK_FLAGS="${LINK_FLAGS} -mconsole" \
EXTRAOBJS="${EXTRAOBJS} win32-resource.o win32-plugin.o" \
SYS_LIBS="-lws2_32 -lwtsapi32 -lpdh -lnetapi32 -liphlpapi -lintl" \
gkrellmd
all
install: install_bin install_inc install_man

View File

@ -114,10 +114,10 @@ OBJS = main.o alerts.o battery.o base64.o clock.o cpu.o disk.o fs.o \
UNIXOBJS = winops-x11.o
all: gkrellm
all: gkrellm$(BINEXT)
gkrellm: check_env $(OBJS) $(UNIXOBJS) $(EXTRAOBJS)
$(CC) $(OBJS) $(UNIXOBJS) $(EXTRAOBJS) -o gkrellm \
gkrellm$(BINEXT): check_env $(OBJS) $(UNIXOBJS) $(EXTRAOBJS)
$(CC) $(OBJS) $(UNIXOBJS) $(EXTRAOBJS) -o $@ \
$(LDFLAGS) $(LIBS) $(LINK_FLAGS)
static: check_env $(OBJS) $(UNIXOBJS) $(EXTRAOBJS)
@ -190,13 +190,14 @@ solaris:
windows: libgkrellm.a
$(MAKE) \
BINEXT=".exe" \
CFLAGS="${CFLAGS} -D_WIN32_WINNT=0x0501 -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN" \
LINK_FLAGS="${LINK_FLAGS} -mwindows" \
EXTRAOBJS="${EXTRAOBJS} winops-win32.o win32-plugin.o win32-resource.o" \
SYS_LIBS="-lws2_32 -lwtsapi32 -lpdh -lnetapi32 -liphlpapi -lintl" \
X11_LIBS="" \
UNIXOBJS="" \
gkrellm
all
install: install_bin install_inc install_man