-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
66 lines (49 loc) · 1.17 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
PREFIX :=
INSTALLDIR := /usr/bin
DATADIR := /usr/share/mydm
OBJS := mydm.o tools.o su.o xsec.o daemon.o
INSTALL_BINS := mydm mydm-greeter-xsec-run mydm-service-install
CROSS :=
CC := gcc
STRIP := strip
LDFLAGS := -lX11 -L.
ifeq "$(DEBUG)" "1"
CFLAGS := -Wall -std=c99 -g -DDEBUG=1
STRIP := ""
else
CFLAGS := -Wall -O2 -std=c99
endif
all : mydm
mydm : $(OBJS)
@echo " LD $@"
@$(CROSS)$(CC) -o mydm $(OBJS) $(LDFLAGS)
ifneq "$(DEBUG)" "1"
@echo " STRIP $@"
@$(CROSS)$(STRIP) -s $@
endif
%.o : %.c config.h
@echo " CC $@"
@$(CROSS)$(CC) -c -o $@ $(CFLAGS) $<
config.h :
@echo "Please run ./mkconfig.sh to generate a config header." >&2
@false
install : all
mkdir -p $(PREFIX)$(INSTALLDIR)
cp $(INSTALL_BINS) $(PREFIX)$(INSTALLDIR)/
chmod a+x $(INSTALL_BINS)
mkdir -p $(PREFIX)$(DATADIR)
cp share/* $(PREFIX)$(DATADIR)
bin-tar : all
./pkgsrc/mkbintar.sh
deb : all
./pkgsrc/mkdeb.sh
defconfig :
./mkconfig.sh --enable-xsec
gtk_greeter:
@$(MAKE) -C greeters/mydm-gtk-demo-greeter
gtk_greeter_install:
@$(MAKE) -C greeters/mydm-gtk-demo-greeter install
clean:
rm -f *.o mydm config.h *.so
rm -rf build-package
@$(MAKE) -C greeters/mydm-gtk-demo-greeter clean