aboutsummaryrefslogblamecommitdiffstats
path: root/Makefile.common
blob: 219f74fe11bd6a1fd195fe9b4b5d371f4731d659 (plain) (tree)
1
2
3
4
5
6
7
8
9
10









                                                         



                       
                                                        
                  





























                                                                                                                          
# common parts of Makefile and Makefile.mingw

COMPILE.c = $(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c

CFLAGS+=-Wall -g -O0 -Werror
CFLAGS += -DPURPLE_PLUGINS 

# generate .d files when compiling
CPPFLAGS += -MMD

ifdef MATRIX_NO_E2E
CFLAGS+=-DMATRIX_NO_E2E
endif

OBJECTS = libmatrix.o matrix-api.o matrix-connection.o \
    matrix-e2e.o \
    matrix-event.o \
    matrix-json.o \
    matrix-room.o \
    matrix-roommembers.o \
    matrix-statetable.o \
    matrix-sync.o

all: $(TARGET)
clean:
	rm -f $(OBJECTS) $(OBJECTS:.o=.d) $(TARGET)

install:
	mkdir -p $(DESTDIR)$(PLUGIN_DIR_PURPLE)
	install -m 664 $(TARGET) $(DESTDIR)$(PLUGIN_DIR_PURPLE)
	for i in 16 22 48; do \
	    mkdir -p $(DESTDIR)$(DATA_ROOT_DIR_PURPLE)/pixmaps/pidgin/protocols/$$i; \
	    install -m 664 matrix-$${i}px.png $(DESTDIR)$(DATA_ROOT_DIR_PURPLE)/pixmaps/pidgin/protocols/$$i/matrix.png; \
	done

$(TARGET): $(OBJECTS)
	$(LINK.o) -shared $^ $(LOADLIBES) $(LDLIBS) -o $@

%.o: %.c
	$(COMPILE.c) $(OUTPUT_OPTION) $<

-include $(OBJECTS:.o=.d)

# Local Variables:
# mode: makefile
# End: