File: Makefile

package info (click to toggle)
gems 1.1-3
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k, sarge
  • size: 288 kB
  • ctags: 285
  • sloc: ansic: 1,514; makefile: 147
file content (41 lines) | stat: -rw-r--r-- 1,025 bytes parent folder | download | duplicates (2)
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
SRCDIR = source/
BINDIR = bin/
COMDIR = ../common/

VPATH = $(COMDIR) $(SRCDIR)
INCS = -I$(COMDIR) -I$(SRCDIR)

PACKDEP = $(BINDIR)gems-client.o
COMMONPACKDEP = $(COMDIR)protocol.o $(COMDIR)sighandlers.o

CLIENTDEP = gems-client.c common.h version.h protocol.h sighandlers.h

##################################################

.PHONY: all bindir remove clean install uninstall

all: bindir $(BINDIR)gems-client

bindir:
	@if [ ! -d "$(BINDIR)" ] ; then mkdir "$(BINDIR)"; fi

$(BINDIR)gems-client : $(PACKDEP) $(COMMONPACKDEP)
	$(CC) $(CFLAGS) $(CDEFINES) $(INCS) -o $@ $^

$(BINDIR)gems-client.o : $(CLIENTDEP)
	$(CC) $(CFLAGS) $(CDEFINES) $(INCS) -c $< -o $@

$(COMDIR)protocol.o: protocol.c common.h version.h protocol.h
	cd $(COMDIR) && $(MAKE)	

$(COMDIR)sighandlers.o: ../common/sighandlers.c ../common/sighandlers.h
	cd $(COMDIR) && $(MAKE)	

remove clean:
	rm -f $(PACKDEP) $(BINDIR)gems-client

install: $(BINDIR)gems-client
	install -m755 -s -D $< $(BINPATH)/gems-client

uninstall:
	rm -fv $(BINPATH)/gems-client