<commit_before>TOP = Xincludes/xc
XTOP = $(TOP)
BUILDINCROOT = $(TOP)/exports
EXTINCSRC = $(XTOP)/include/extensions
INCLUDESRC = $(BUILDINCROOT)/include
XINCLUDESRC = $(INCLUDESRC)/X11
SERVERSRC = $(XTOP)/programs/Xserver
XF86PCIINCLUDE = $(TOP)/programs/Xserver/hw/xfree86/os-support/bus
TOP_X_INCLUDES = -I$(TOP)/exports/include
TOP_INCLUDES = -I$(TOP) $(TOP_X_INCLUDES)

INSTALLED_X = /usr/X11R6
BINDIR = /usr/local/bin
MANDIR = /usr/local/man/man1

XF86SRC = $(SERVERSRC)/hw/xfree86
XF86COMSRC = $(XF86SRC)/common
XF86OSSRC = $(XF86SRC)/os-support


INCLUDES = -I. -I$(XF86COMSRC) -I$(SERVERSRC)/hw/xfree86/loader -I$(XF86OSSRC) -I$(SERVERSRC)/mi -I$(SERVERSRC)/include -I$(XINCLUDESRC) -I$(EXTINCSRC) -I$(TOP)/include -I$(SERVERSRC)/hw/xfree86 -I$(SERVERSRC)/hw/xfree86/parser -I$(XF86PCIINCLUDE)

ALLINCLUDES = $(INCLUDES) $(TOP_INCLUDES)

MODULE_DEFINES = -DIN_MODULE -DXFree86Module
PROTO_DEFINES = -DFUNCPROTO=15 -DNARROWPROTO

STD_DEFINES = -Dlinux -D__i386__ -D_POSIX_C_SOURCE=199309L -D_POSIX_SOURCE -D_XOPEN_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE  -D_GNU_SOURCE  -DSHAPE -DXINPUT -DXKB -DLBX -DXAPPGROUP -DXCSECURITY -DTOGCUP   -DDPMSExtension  -DPIXPRIV -DPANORAMIX  -DRENDER -DGCCUSESGAS -DAVOID_GLYPHBLT -DPIXPRIV -DSINGLEDEPTH -DXFreeXDGA -DXvExtension -DXFree86LOADER  -DXFree86Server -DXF86VIDMODE  -DSMART_SCHEDULE -DBUILDDEBUG -DX_BYTE_ORDER=X_LITTLE_ENDIAN -DNDEBUG
ALLDEFINES = $(ALLINCLUDES) $(STD_DEFINES) $(PROTO_DEFINES) $(MODULE_DEFINES)

check_gcc = $(shell if $(CC) $(1) -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi ;)

CCOPTIONS = -pedantic -Wall -Wpointer-arith
CCOPTIONS += $(call check_gcc,-fno-merge-constants,)
CDEBUGFLAGS = -O2
CFLAGS = $(CDEBUGFLAGS) $(CCOPTIONS) $(ALLDEFINES)
CFLAGSCLIENT = $(CDEBUGFLAGS) $(CCOPTIONS) -I$(INSTALLED_X)/include

CC = gcc

LDCOMBINEFLAGS = -r

SRCS = synaptics.c ps2comm.c
OBJS = synaptics.o ps2comm.o

.c.o:
	$(RM) $@
	$(CC) -c $(CFLAGS) $(_NOOP_) $*.c

all:: synaptics_drv.o synclient syndaemon

install: $(BINDIR)/synclient $(BINDIR)/syndaemon $(INSTALLED_X)/lib/modules/input/synaptics_drv.o install-man

install-man: $(MANDIR)/synclient.1 $(MANDIR)/syndaemon.1

$(MANDIR)/synclient.1:
	install -D manpages/synclient.1 $(DESTDIR)/$@

$(MANDIR)/syndaemon.1:
	install -D manpages/syndaemon.1 $(DESTDIR)/$@

$(BINDIR)/synclient : synclient
	cp $< $@

$(BINDIR)/syndaemon : syndaemon
	cp $< $@

$(INSTALLED_X)/lib/modules/input/synaptics_drv.o : synaptics_drv.o
	cp $< $@

synaptics_drv.o: $(OBJS)
	$(RM) $@
	$(LD) $(LDCOMBINEFLAGS)  $(OBJS) -o $@

synclient.o	: synclient.c
	$(CC) $(CFLAGSCLIENT) -c -o $@ $<

synclient	: synclient.o
	$(CC) -o $@ $< -lm

syndaemon.o	: syndaemon.c
	$(CC) $(CFLAGSCLIENT) -c -o $@ $<

syndaemon	: syndaemon.o
	$(CC) -o $@ $< -lm -L$(INSTALLED_X)/lib -lXext -lX11

testprotokoll: testprotokoll.c
	$(CC) -o testprotokoll testprotokoll.c

synaptics.o : synaptics.h ps2comm.h linux_input.h
ps2comm.o   : ps2comm.h<commit_msg>Added proper Makefile dependencies for synclient.1 and syndaemon.1 so that they are re-installed if/when they are changed.<commit_after>TOP = Xincludes/xc
XTOP = $(TOP)
BUILDINCROOT = $(TOP)/exports
EXTINCSRC = $(XTOP)/include/extensions
INCLUDESRC = $(BUILDINCROOT)/include
XINCLUDESRC = $(INCLUDESRC)/X11
SERVERSRC = $(XTOP)/programs/Xserver
XF86PCIINCLUDE = $(TOP)/programs/Xserver/hw/xfree86/os-support/bus
TOP_X_INCLUDES = -I$(TOP)/exports/include
TOP_INCLUDES = -I$(TOP) $(TOP_X_INCLUDES)

INSTALLED_X = /usr/X11R6
BINDIR = /usr/local/bin
MANDIR = /usr/local/man/man1

XF86SRC = $(SERVERSRC)/hw/xfree86
XF86COMSRC = $(XF86SRC)/common
XF86OSSRC = $(XF86SRC)/os-support


INCLUDES = -I. -I$(XF86COMSRC) -I$(SERVERSRC)/hw/xfree86/loader -I$(XF86OSSRC) -I$(SERVERSRC)/mi -I$(SERVERSRC)/include -I$(XINCLUDESRC) -I$(EXTINCSRC) -I$(TOP)/include -I$(SERVERSRC)/hw/xfree86 -I$(SERVERSRC)/hw/xfree86/parser -I$(XF86PCIINCLUDE)

ALLINCLUDES = $(INCLUDES) $(TOP_INCLUDES)

MODULE_DEFINES = -DIN_MODULE -DXFree86Module
PROTO_DEFINES = -DFUNCPROTO=15 -DNARROWPROTO

STD_DEFINES = -Dlinux -D__i386__ -D_POSIX_C_SOURCE=199309L -D_POSIX_SOURCE -D_XOPEN_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE  -D_GNU_SOURCE  -DSHAPE -DXINPUT -DXKB -DLBX -DXAPPGROUP -DXCSECURITY -DTOGCUP   -DDPMSExtension  -DPIXPRIV -DPANORAMIX  -DRENDER -DGCCUSESGAS -DAVOID_GLYPHBLT -DPIXPRIV -DSINGLEDEPTH -DXFreeXDGA -DXvExtension -DXFree86LOADER  -DXFree86Server -DXF86VIDMODE  -DSMART_SCHEDULE -DBUILDDEBUG -DX_BYTE_ORDER=X_LITTLE_ENDIAN -DNDEBUG
ALLDEFINES = $(ALLINCLUDES) $(STD_DEFINES) $(PROTO_DEFINES) $(MODULE_DEFINES)

check_gcc = $(shell if $(CC) $(1) -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi ;)

CCOPTIONS = -pedantic -Wall -Wpointer-arith
CCOPTIONS += $(call check_gcc,-fno-merge-constants,)
CDEBUGFLAGS = -O2
CFLAGS = $(CDEBUGFLAGS) $(CCOPTIONS) $(ALLDEFINES)
CFLAGSCLIENT = $(CDEBUGFLAGS) $(CCOPTIONS) -I$(INSTALLED_X)/include

CC = gcc

LDCOMBINEFLAGS = -r

SRCS = synaptics.c ps2comm.c
OBJS = synaptics.o ps2comm.o

.c.o:
	$(RM) $@
	$(CC) -c $(CFLAGS) $(_NOOP_) $*.c

all:: synaptics_drv.o synclient syndaemon

install: $(BINDIR)/synclient $(BINDIR)/syndaemon $(INSTALLED_X)/lib/modules/input/synaptics_drv.o install-man

install-man: $(MANDIR)/synclient.1 $(MANDIR)/syndaemon.1

$(MANDIR)/synclient.1: manpages/synclient.1
	install -D $< $(DESTDIR)/$@

$(MANDIR)/syndaemon.1: manpages/syndaemon.1
	install -D $< $(DESTDIR)/$@

$(BINDIR)/synclient : synclient
	cp $< $@

$(BINDIR)/syndaemon : syndaemon
	cp $< $@

$(INSTALLED_X)/lib/modules/input/synaptics_drv.o : synaptics_drv.o
	cp $< $@

synaptics_drv.o: $(OBJS)
	$(RM) $@
	$(LD) $(LDCOMBINEFLAGS)  $(OBJS) -o $@

synclient.o	: synclient.c
	$(CC) $(CFLAGSCLIENT) -c -o $@ $<

synclient	: synclient.o
	$(CC) -o $@ $< -lm

syndaemon.o	: syndaemon.c
	$(CC) $(CFLAGSCLIENT) -c -o $@ $<

syndaemon	: syndaemon.o
	$(CC) -o $@ $< -lm -L$(INSTALLED_X)/lib -lXext -lX11

testprotokoll: testprotokoll.c
	$(CC) -o testprotokoll testprotokoll.c

synaptics.o : synaptics.h ps2comm.h linux_input.h
ps2comm.o   : ps2comm.h
{'fraction_non_alphanumeric': 0.16917479742020836, 'fraction_numerical': 0.02414420373739044, 'mean_word_length': 4.7164461247637055, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '27562', 'n_tokens_mistral': 2832, 'n_tokens_neox': 2660, 'n_words': 457}