mirror of
https://github.com/UberGames/GtkRadiant.git
synced 2024-11-12 23:44:13 +00:00
* removed config.mk (not used)
* fixed some warnings in synapse.cpp (const stuff, unused variable) git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@263 8a3a26a2-13c4-0310-b231-cf6edde360e5
This commit is contained in:
parent
5265d3cc15
commit
5efe3f31db
2 changed files with 43 additions and 76 deletions
|
@ -239,10 +239,9 @@ void CSynapseServer::EnumerateInterfaces(Str &soname)
|
||||||
{
|
{
|
||||||
CSynapseClientSlot slot;
|
CSynapseClientSlot slot;
|
||||||
slot.mpDLL = dlopen (soname.GetBuffer(), RTLD_NOW);
|
slot.mpDLL = dlopen (soname.GetBuffer(), RTLD_NOW);
|
||||||
PFN_SYNAPSE_ENUMERATEINTERFACES *pEnumerate;
|
|
||||||
if (!slot.mpDLL)
|
if (!slot.mpDLL)
|
||||||
{
|
{
|
||||||
char* error;
|
const char* error;
|
||||||
if ((error = (char *)dlerror()) == NULL)
|
if ((error = (char *)dlerror()) == NULL)
|
||||||
error = "Unknown";
|
error = "Unknown";
|
||||||
Syn_Printf("dlopen '%s' failed\n dlerror: '%s'\n", soname.GetBuffer(), error);
|
Syn_Printf("dlopen '%s' failed\n dlerror: '%s'\n", soname.GetBuffer(), error);
|
||||||
|
@ -251,7 +250,7 @@ void CSynapseServer::EnumerateInterfaces(Str &soname)
|
||||||
slot.mpEnumerate = (PFN_SYNAPSE_ENUMERATEINTERFACES)dlsym(slot.mpDLL, NAME_SYNAPSE_ENUMERATEINTERFACES);
|
slot.mpEnumerate = (PFN_SYNAPSE_ENUMERATEINTERFACES)dlsym(slot.mpDLL, NAME_SYNAPSE_ENUMERATEINTERFACES);
|
||||||
if (!slot.mpEnumerate)
|
if (!slot.mpEnumerate)
|
||||||
{
|
{
|
||||||
char* error;
|
const char* error;
|
||||||
if ((error = (char *)dlerror()) == NULL)
|
if ((error = (char *)dlerror()) == NULL)
|
||||||
error = "Unknown";
|
error = "Unknown";
|
||||||
Syn_Printf("dlsym '%s' failed on shared object '%s'\n dlerror: '%s'\n", NAME_SYNAPSE_ENUMERATEINTERFACES, soname.GetBuffer(), error);
|
Syn_Printf("dlsym '%s' failed on shared object '%s'\n dlerror: '%s'\n", NAME_SYNAPSE_ENUMERATEINTERFACES, soname.GetBuffer(), error);
|
||||||
|
@ -264,7 +263,7 @@ void CSynapseServer::EnumerateInterfaces(Str &soname)
|
||||||
Syn_Printf("Enumerate interfaces on '%s' returned NULL, unloading.\n", soname.GetBuffer());
|
Syn_Printf("Enumerate interfaces on '%s' returned NULL, unloading.\n", soname.GetBuffer());
|
||||||
if (dlclose(slot.mpDLL))
|
if (dlclose(slot.mpDLL))
|
||||||
{
|
{
|
||||||
char* error;
|
const char* error;
|
||||||
if ((error = (char *)dlerror()) == NULL)
|
if ((error = (char *)dlerror()) == NULL)
|
||||||
error = "Unknown";
|
error = "Unknown";
|
||||||
Syn_Printf(" dlclose failed: dlerror: '%s'\n", error);
|
Syn_Printf(" dlclose failed: dlerror: '%s'\n", error);
|
||||||
|
@ -285,7 +284,7 @@ void CSynapseClientSlot::ReleaseSO()
|
||||||
Syn_Printf("dlclose '%s'\n", mpClient->GetInfo());
|
Syn_Printf("dlclose '%s'\n", mpClient->GetInfo());
|
||||||
if (dlclose(mpDLL))
|
if (dlclose(mpDLL))
|
||||||
{
|
{
|
||||||
char* error;
|
const char* error;
|
||||||
if ((error = (char *)dlerror()) == NULL)
|
if ((error = (char *)dlerror()) == NULL)
|
||||||
error = "Unknown";
|
error = "Unknown";
|
||||||
Syn_Printf(" dlclose failed: dlerror: '%s'\n", error);
|
Syn_Printf(" dlclose failed: dlerror: '%s'\n", error);
|
||||||
|
|
|
@ -1,32 +0,0 @@
|
||||||
# Common configuration options for all plugins
|
|
||||||
|
|
||||||
CC=gcc
|
|
||||||
CXX=g++
|
|
||||||
CFLAGS+=`gtk-config --cflags` -Wall -g -I../../include
|
|
||||||
CPPFLAGS+=`gtk-config --cflags` -Wall -g -I../../include
|
|
||||||
LDFLAGS+=`gtk-config --libs` -shared
|
|
||||||
OUTDIR=$(RADIANT_DATA)plugins
|
|
||||||
OBJS := $(patsubst %.cpp,%.o,$(filter %.cpp,$(SRC)))
|
|
||||||
OBJS += $(patsubst %.c,%.o,$(filter %.c,$(SRC)))
|
|
||||||
|
|
||||||
all: $(OUTPUT)
|
|
||||||
|
|
||||||
$(OUTPUT): $(OBJS)
|
|
||||||
$(CXX) -o $(OUTPUT) $(OBJS) $(LDFLAGS)
|
|
||||||
@if [ -d $(OUTDIR) ]; then cp $(OUTPUT) $(OUTDIR); fi
|
|
||||||
|
|
||||||
## Other targets
|
|
||||||
.PHONY: clean
|
|
||||||
|
|
||||||
clean:
|
|
||||||
rm -f *.o *.d $(OUTPUT) core
|
|
||||||
|
|
||||||
## Dependencies
|
|
||||||
-include $(OBJS:.o=.d)
|
|
||||||
|
|
||||||
%.d: %.cpp
|
|
||||||
@echo -n "$(@) " > $@
|
|
||||||
@if { !(eval $(CXX) -MM $(CPPFLAGS) -w $<) >> $@; }; then \
|
|
||||||
rm -f $@; exit 1; \
|
|
||||||
fi
|
|
||||||
@[ -s $@ ] || rm -f $@
|
|
Loading…
Reference in a new issue