summaryrefslogtreecommitdiff
path: root/Makefile
blob: 4aee28925199f4e1818f771e3389115a754045db (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
PREFIX := /usr/local
BIN_DIR := $(PREFIX)/bin

ifdef PCC
PCC_CFLAGS=-D__float128="long double"
else
PCC_CFLAGS=
endif


CFLAGS = $(PCC_CFLAGS) $(CFLAGS_EXTRA)
OBJS = sux.o asmmon.o lexer.o
OBJS2 = subasm.o subeditor.o
OBJ_NAME = cisc-0.2
OBJ_NAME2 = subeditor-c
all : clean clean_subeditor $(OBJ_NAME)
subeditor : clean_subeditor $(OBJS2)
	$(CC) $(OBJS2) $(CFLAGS) -lcurses -ltinfo -o $(OBJ_NAME2)
cisc-0.2: $(OBJS)
	$(CC) $(OBJS) $(CFLAGS) -lpthread -lcurses -ltinfo -o $(OBJ_NAME)
sux.o :
	$(CC) sux.c -c $(CFLAGS) -o sux.o
asmmon.o :
	$(CC) asmmon.c -c $(CFLAGS) -o asmmon.o
lexer.o :
	$(CC) lexer.c -c $(CFLAGS) -o lexer.o
subasm.o :
	$(CC) programs/c-ports/subasm.c -c $(CFLAGS) -o subasm.o
subeditor.o :
	$(CC) programs/c-ports/subeditor.c -c $(CFLAGS) -o subeditor.o
clean :
	rm -f $(OBJ_NAME) $(OBJ_NAME2) $(OBJS) $(OBJS2)
clean_subeditor :
	rm -f $(OBJ_NAME2) $(OBJS2)
install :
	install -D -m755 $(OBJ_NAME) $(BIN_DIR)/$(OBJ_NAME)
uninstall :
	rm -f $(BIN_DIR)/$(OBJ_NAME)