summaryrefslogtreecommitdiff
path: root/Makefile
blob: 083c4f43255626173dc6068b8cdb029fd0acb519 (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
# uuterm, Copyright (C) 2006 Rich Felker; licensed under GNU GPL v2 only

default: all

ifeq ($(HOSTCC),)
HOSTCC = $(CC)
endif

SRCS = main.c term.c cell.c decomp.c tty.c alloc.c refresh.c ascii.c ucf.c font_load.c
OBJS = $(SRCS:.c=.o)
OBJS_FB = fbcon.o dblbuf.o
OBJS_X11 = xlib.o
LDFLAGS_X11 = -L/usr/X11R6/lib

YTTY_BASE = ./ytty/

ALL := uuterm-x11 uuterm-fb ucfcomp $(YTTY_BASE)ytty.ucf
CLEAN := $(ALL) $(OBJS) $(OBJS_FB) $(OBJS_X11)

include $(YTTY_BASE)Makefile

CFLAGS = -O2 -s #-g
LDFLAGS = -s

-include config.mak

all: $(ALL)

$(OBJS) $(OBJS_FB) $(OBJS_X11): uuterm.h

decomp.o: decomp.h

uuterm-fb: $(OBJS) $(OBJS_FB)
	$(CC) $(LDFLAGS) -o $@ $(OBJS) $(OBJS_FB) $(LIBS)

uuterm-x11: $(OBJS) $(OBJS_X11)
	$(CC) $(LDFLAGS) $(LDFLAGS_X11) -o $@ $(OBJS) $(OBJS_X11) -lX11 $(LIBS)

ucfcomp: ucfcomp.c
	$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $<

clean:
	rm -f $(CLEAN)