2021-06-02 01:49:27 -07:00
|
|
|
# WorldSpawn Makefile
|
|
|
|
|
2021-06-06 23:20:34 -07:00
|
|
|
GLIB_CFLAGS=$(shell pkg-config --cflags gtk+-2.0) -DGTK_TARGET=2
|
2021-06-02 01:49:27 -07:00
|
|
|
GLIB_LDFLAGS=$(shell pkg-config --libs gtk+-2.0)
|
2021-06-06 23:20:34 -07:00
|
|
|
|
2021-06-06 10:08:06 -07:00
|
|
|
PLUGIN_CFLAGS=$(CFLAGS) $(GLIB_CFLAGS) -I../../include -I../../libs -fPIC -fvisibility=hidden
|
2021-06-02 01:49:27 -07:00
|
|
|
PLUGIN_LDFLAGS=$(LDFLAGS) $(GLIB_LDFLAGS) -shared
|
2022-05-13 09:34:58 -07:00
|
|
|
LIB_EXT=so
|
2021-06-02 01:49:27 -07:00
|
|
|
|
|
|
|
DO_CXX=$(CXX) $(PLUGIN_CFLAGS) -o $@ -c $<
|
|
|
|
|
|
|
|
.cpp.o:
|
|
|
|
$(DO_CXX)
|
|
|
|
|
|
|
|
WS_OBJS = \
|
|
|
|
parse.o plugin.o write.o
|
|
|
|
|
|
|
|
# binary target
|
2022-05-13 09:34:58 -07:00
|
|
|
../../build/plugins/libmapq3.$(LIB_EXT): $(WS_OBJS)
|
2021-08-08 08:10:20 -07:00
|
|
|
$(CXX) -o $@ $(WS_OBJS) $(PLUGIN_LDFLAGS)
|
2021-06-02 01:49:27 -07:00
|
|
|
|
|
|
|
# object files
|
|
|
|
parse.o: parse.cpp parse.h
|
|
|
|
plugin.o: plugin.cpp
|
|
|
|
write.o: write.cpp write.h
|
|
|
|
|
|
|
|
clean:
|
2022-05-13 09:34:58 -07:00
|
|
|
-rm -f *.o ../../build/plugins/libmapq3.$(LIB_EXT)
|