mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2025-01-01 08:06:00 +01:00
Update Makefile
This commit is contained in:
parent
95c3037a45
commit
86b54e728b
3 changed files with 7 additions and 9 deletions
|
@ -73,7 +73,6 @@ zathura_document_plugins_load(void)
|
||||||
if (closedir(dir) == -1) {
|
if (closedir(dir) == -1) {
|
||||||
fprintf(stderr, "error: could not close plugin directory: %s\n", PLUGIN_DIR);
|
fprintf(stderr, "error: could not close plugin directory: %s\n", PLUGIN_DIR);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -83,6 +82,7 @@ zathura_document_plugins_free(void)
|
||||||
zathura_document_plugin_t* plugin = zathura_document_plugins;
|
zathura_document_plugin_t* plugin = zathura_document_plugins;
|
||||||
while (plugin) {
|
while (plugin) {
|
||||||
zathura_document_plugin_t* tmp = plugin->next;
|
zathura_document_plugin_t* tmp = plugin->next;
|
||||||
|
free(plugin->file_extension);
|
||||||
free(plugin);
|
free(plugin);
|
||||||
plugin = tmp;
|
plugin = tmp;
|
||||||
}
|
}
|
||||||
|
@ -91,7 +91,7 @@ zathura_document_plugins_free(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
zathura_document_register_plugin(char* file_extension, zathura_document_open_t open_function)
|
zathura_document_plugin_register(char* file_extension, zathura_document_open_t open_function)
|
||||||
{
|
{
|
||||||
if( (file_extension == NULL) || (open_function == NULL) ) {
|
if( (file_extension == NULL) || (open_function == NULL) ) {
|
||||||
fprintf(stderr, "plugin: could not register\n");
|
fprintf(stderr, "plugin: could not register\n");
|
||||||
|
@ -120,7 +120,7 @@ zathura_document_register_plugin(char* file_extension, zathura_document_open_t o
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
new_plugin->file_extension = file_extension;
|
new_plugin->file_extension = strdup(file_extension);
|
||||||
new_plugin->open_function = open_function;
|
new_plugin->open_function = open_function;
|
||||||
new_plugin->next = NULL;
|
new_plugin->next = NULL;
|
||||||
|
|
||||||
|
|
|
@ -33,10 +33,9 @@ ${PLUGIN}: ${OBJECTS}
|
||||||
|
|
||||||
${PLUGIN}-debug: ${DOBJECTS}
|
${PLUGIN}-debug: ${DOBJECTS}
|
||||||
@echo LD $@
|
@echo LD $@
|
||||||
@${CC} -shared ${LDFLAGS} -o ${PLUGIN}-debug.so $(DOBJECTS) ${LIBS}
|
@${CC} -shared ${LDFLAGS} -o ${PLUGIN}.so $(DOBJECTS) ${LIBS}
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
@rm -rf ${OBJECTS} ${DOBJECTS} $(PLUGIN).so ${PLUGIN}-debug.so
|
@rm -rf ${OBJECTS} ${DOBJECTS} $(PLUGIN).so
|
||||||
|
|
||||||
debug: options ${PLUGIN}-debug
|
debug: options ${PLUGIN}-debug
|
||||||
@make -C debug
|
|
||||||
|
|
|
@ -33,10 +33,9 @@ ${PLUGIN}: ${OBJECTS}
|
||||||
|
|
||||||
${PLUGIN}-debug: ${DOBJECTS}
|
${PLUGIN}-debug: ${DOBJECTS}
|
||||||
@echo LD $@
|
@echo LD $@
|
||||||
@${CC} -shared ${LDFLAGS} -o ${PLUGIN}-debug.so $(DOBJECTS) ${LIBS}
|
@${CC} -shared ${LDFLAGS} -o ${PLUGIN}.so $(DOBJECTS) ${LIBS}
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
@rm -rf ${OBJECTS} ${DOBJECTS} $(PLUGIN).so ${PLUGIN}-debug.so
|
@rm -rf ${OBJECTS} ${DOBJECTS} $(PLUGIN).so
|
||||||
|
|
||||||
debug: options ${PLUGIN}-debug
|
debug: options ${PLUGIN}-debug
|
||||||
@make -C debug
|
|
||||||
|
|
Loading…
Reference in a new issue