mirror of
https://github.com/UberGames/GtkRadiant.git
synced 2024-11-14 16:31:36 +00:00
8037810110
git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/branches/ZeroRadiant@177 8a3a26a2-13c4-0310-b231-cf6edde360e5
32 lines
764 B
Makefile
32 lines
764 B
Makefile
# 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 $@
|