regproj.cgi: adjust mirror/push default setting
[girocco.git] / src / Makefile
blob76300e17bba912cbb899733748200e7a990ed2b8
1 CC ?= cc
2 CFLAGS ?= -O
4 .PHONY : all clean install FORCE
6 all : can_user_push can_user_push_http getent get_user_uuid
8 clean :
9 rm -rf can_user_push.o* can_user_push.d* can_user_push
10 rm -rf can_user_push_http.o* can_user_push_http.d* can_user_push_http
11 rm -rf getent.o* getent.d* getent
12 rm -rf get_user_uuid.o* get_user_uuid.d* get_user_uuid
13 rm -f GROUP-FILE PASSWD-FILE
15 install :
17 TRACK_GROUP_FILE := $(shell cd .. && . ./shlib.sh && echo "$$cfg_chroot/etc/group")
18 export TRACK_GROUP_FILE
19 TRACK_PASSWD_FILE := $(shell cd .. && . ./shlib.sh && echo "$$cfg_chroot/etc/passwd")
20 export TRACK_PASSWD_FILE
22 GROUP-FILE: FORCE
23 @if test x"$$TRACK_GROUP_FILE" != x"`cat GROUP-FILE 2>/dev/null`"; then \
24 echo "* new group file location"; \
25 echo "$$TRACK_GROUP_FILE" >GROUP-FILE; \
28 PASSWD-FILE: FORCE
29 @if test x"$$TRACK_PASSWD_FILE" != x"`cat PASSWD-FILE 2>/dev/null`"; then \
30 echo "* new passwd file location"; \
31 echo "$$TRACK_PASSWD_FILE" >PASSWD-FILE; \
34 can_user_push : can_user_push.c
35 $(CC) -o $@ $(CFLAGS) $?
37 can_user_push_http : can_user_push_http.c GROUP-FILE
38 $(CC) -o $@ $(CFLAGS) -D"GROUP_FILE=\"$(TRACK_GROUP_FILE)\"" can_user_push_http.c
40 getent : getent.c
41 $(CC) -o $@ $(CFLAGS) $?
43 get_user_uuid : get_user_uuid.c PASSWD-FILE
44 $(CC) -o $@ $(CFLAGS) -D"PASSWD_FILE=\"$(TRACK_PASSWD_FILE)\"" get_user_uuid.c