-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
53 lines (34 loc) · 952 Bytes
/
Makefile
File metadata and controls
53 lines (34 loc) · 952 Bytes
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
#SHELL := /bin/bash
# ==================================================
# COMMANDS
CC = gcc
RM = rm -f
# ==================================================
# DIRECTORIES
SRC = src
LIB = lib
BIN = bin
# ==================================================
# TARGETS
EXEC = chshell
# ==================================================
# COMPILATION
all: compile_libs compile_chshell
compile_chshell: $(EXEC)
# -- add any dependencies here
%: $(SRC)/%.c
$(CC) $< -o $(BIN)/$@ $(LIB)/termcap/bin/libtermcap.a -I$(LIB)
clean: clean_libs
$(RM) $(SRC)/*~ *~
purge: clean
$(RM) $(addprefix $(BIN)/, $(EXEC))
# ==================================================
# DEPENDENCIES
# Compile
compile_termcap:
@cd ./$(LIB)/termcap/src && sh ./configure && make && cp ./libtermcap.a ../bin/
compile_libs: compile_termcap
# Clean
clean_termcap:
@cd ./$(LIB)/termcap/src && make clean && cd ../bin && rm -f libtermcap.a
clean_libs: clean_termcap