aboutsummaryrefslogblamecommitdiffstats
path: root/gg_trackproc/Makefile
blob: fb3b094464d125bb2f15d6aa9091e071df51921b (plain) (tree)
1
2
3
4
5
6
7
8
                     



                    

    
                                                                   




















                                                                                       
TARGET = gg_trackproc
USER = _gg_sniff

PREFIX=/usr/local
BINDIR=$(PREFIX)/bin

all:
	$(CC) -O2 -lglouglou -levent -Wall -o $(TARGET) $(TARGET).c

install: $(TARGET)
	@echo "creating group and user $(USER)"
	@uname -a |grep -i linux >/dev/null ;\
	if [ $$? -eq 0 ]; then \
		cmdg="groupadd -r $(USER)" ;\
		cmdu="useradd -r -g $(USER) -d /var/empty/ -s /sbin/nologin $(USER)" ;\
	else \
		cmdg="" ;\
		cmdu="useradd -g =uid -d /var/empty/ -s /sbin/nologin $(USER)" ;\
	fi ;\
	echo $$cmdg; $$($$cmdg) ;\
	echo $$cmdu; $$($$cmdu) ;\
	echo done
	@echo "installation of $(TARGET)"
	mkdir -p $(BINDIR)
	install -m 0755 $(TARGET) $(BINDIR)

clean:
	rm -f $(TARGET) $(OBJS) *~