-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
35 lines (25 loc) · 956 Bytes
/
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
PREFIX :=
INSTALLDIR := /usr/lib/mydm/mydm-gtk-demo-greeter
OBJS := mydm-gtk-demo-greeter.o ../../su.o
CROSS :=
CC := gcc
STRIP := strip
CFLAGS := -Wall -O2 -std=c99 `pkg-config --cflags gtk+-3.0`
LDFLAGS := `pkg-config --libs gtk+-3.0` -lcrypt -rdynamic
all : mydm-gtk-demo-greeter
mydm-gtk-demo-greeter : $(OBJS)
$(CROSS)$(CC) -o $@ $(OBJS) $(LDFLAGS)
$(CROSS)$(STRIP) -s $@
mydm-gtk-demo-greeter.o : mydm-gtk-demo-greeter.c
$(CROSS)$(CC) -c -o $@ $(CFLAGS) mydm-gtk-demo-greeter.c -lcrypt
../../su.o :
@echo ' >>> You need compile mydm first, because I need it!'
@false
clean:
rm -f *.o mydm-gtk-demo-greeter
install : all
mkdir -p $(PREFIX)$(INSTALLDIR)/
cp mydm-gtk-demo-greeter deinit desktop_run mydm-gtk-demo-greeter.glade $(PREFIX)$(INSTALLDIR)/
chmod +x $(PREFIX)$(INSTALLDIR)/mydm-gtk-demo-greeter $(PREFIX)$(INSTALLDIR)/deinit $(PREFIX)$(INSTALLDIR)/desktop_run
mkdir -p $(PREFIX)/etc/mydm
cp etcfiles/* $(PREFIX)/etc/mydm