blob: 444651cb1936d323672b7504b1be38f31d12090c (
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
# multi-terminal - a simple gtk terminal
include config.mk
SRC = mt.c
OBJ = ${SRC:.c=.o}
all: options mt
options:
@echo mt build options:
@echo "CFLAGS = ${CFLAGS}"
@echo "LDFLAGS = ${LDFLAGS}"
@echo "CC = ${CC}"
.c.o:
@echo CC $<
@${CC} -c ${CFLAGS} $<
${OBJ}: config.mk
mt: ${OBJ}
@echo CC -o $@
@${CC} -o $@ mt.o ${LDFLAGS}
clean:
@echo cleaning
@rm -f mt ${OBJ} mt-${VERSION}.tar.gz
dist: clean
@echo creating dist tarball
@mkdir -p mt-${VERSION}
@cp -R Makefile config.mk ${SRC} mt-${VERSION}
@tar -cf mt-${VERSION}.tar mt-${VERSION}
@gzip mt-${VERSION}.tar
@rm -rf mt-${VERSION}
install: all
@echo installing executable file to ${DESTDIR}${PREFIX}/bin
@mkdir -p ${DESTDIR}${PREFIX}/bin
@cp -f mt ${DESTDIR}${PREFIX}/bin
@chmod 755 ${DESTDIR}${PREFIX}/bin/mt
uninstall:
@echo removing executable file from ${DESTDIR}${PREFIX}/bin
@rm -f ${DESTDIR}${PREFIX}/bin/mt
.PHONY: all options clean dist install uninstall
|