Skip to content

Commit

Permalink
Merge pull request #1033 from dunst0/fixpdbt
Browse files Browse the repository at this point in the history
utils/pdbt: FreeBSD fix, gcc is hardcoded, header is missing
  • Loading branch information
miconda committed Mar 15, 2017
2 parents b926e40 + 32e1e50 commit 8cd194d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
14 changes: 11 additions & 3 deletions utils/pdbt/Makefile
@@ -1,3 +1,11 @@
#set some vars from the environment (and not make builtins)
CC := $(shell echo "$${CC}")

# find compiler name & version
ifeq ($(CC),)
CC=gcc
endif

.phony: all clean install

header=common.h carrier.h dt.h dtm.h pdb_server_backend.h log.h
Expand All @@ -10,13 +18,13 @@ extdep=Makefile
all: pdbt pdb_server

$(obj): %.o : %.c %.h $(header) $(extdep)
gcc $(cflags) -c $<
$(CC) $(cflags) -c $<

pdbt: pdbt.c $(obj) $(header) $(extdep)
gcc $(cflags) -o $@ $< $(obj)
$(CC) $(cflags) -o $@ $< $(obj)

pdb_server: pdb_server.c $(pdb_server_obj) $(header) $(extdep)
gcc $(cflags) -o $@ $< $(pdb_server_obj)
$(CC) $(cflags) -o $@ $< $(pdb_server_obj)

clean:
rm -f *~ *.o pdbt pdb_server
Expand Down
1 change: 1 addition & 0 deletions utils/pdbt/pdbt.c
Expand Up @@ -28,6 +28,7 @@
#include <poll.h>
#include <ctype.h>
#include <sys/socket.h>
#include <sys/stat.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
Expand Down

0 comments on commit 8cd194d

Please sign in to comment.