summaryrefslogtreecommitdiff
path: root/core/opiealarm/Makefile
blob: e988abfc15f4ea67ea159659a41cf168b46178e2 (plain)
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

DESTDIR=../../bin

CROSS:=arm-linux-
CC   :=$(CROSS)gcc
LD   :=$(CROSS)gcc
STRIP:=$(CROSS)strip

CFLAGS:=-O2
LDFLAGS:=

all: $(DESTDIR)/opiealarm $(DESTDIR)/opieatd

$(DESTDIR)/opiealarm: opiealarm.c
	$(CC) $(CFLAGS) opiealarm.c -o $(DESTDIR)/opiealarm $(LDFLAGS)
	$(STRIP) -s $(DESTDIR)/opiealarm
	chmod u+s $(DESTDIR)/opiealarm
	chown root $(DESTDIR)/opiealarm 2>/dev/null || echo -e "\nopiealarm must be owned by root to work correctly.\n"

$(DESTDIR)/opieatd: opieatd
	cp opieatd $(DESTDIR)/opieatd
	chmod +x $(DESTDIR)/opieatd
	
clean:
	-rm -f *~ core