summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2007-10-02 06:50:43 +0000
committerRich Felker <dalias@aerifal.cx>2007-10-02 06:50:43 +0000
commit822b3e760e4840dc688a840610379d977cec7b0c (patch)
treed4b6f5f61a6862cd988dbe95b96e6e4c19881c40 /Makefile
parent2a2e17bc6d57137bca9d764c23f1b178536900cd (diff)
include the ucf font compiler and the ytty font in uuterm repository,
incorporating a simple nonrecursive build system for the font.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile22
1 files changed, 16 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 44bd7ed..083c4f4 100644
--- a/Makefile
+++ b/Makefile
@@ -1,21 +1,29 @@
# uuterm, Copyright (C) 2006 Rich Felker; licensed under GNU GPL v2 only
+default: all
-SRCS = main.c term.c cell.c decomp.c tty.c alloc.c refresh.c ascii.c ucf.c font_load.c
+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
-ALL = uuterm-x11 uuterm-fb
+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
-OBJS = $(SRCS:.c=.o)
-
all: $(ALL)
$(OBJS) $(OBJS_FB) $(OBJS_X11): uuterm.h
@@ -28,6 +36,8 @@ uuterm-fb: $(OBJS) $(OBJS_FB)
uuterm-x11: $(OBJS) $(OBJS_X11)
$(CC) $(LDFLAGS) $(LDFLAGS_X11) -o $@ $(OBJS) $(OBJS_X11) -lX11 $(LIBS)
-clean:
- rm -f $(OBJS) $(OBJS_FB) $(OBJS_X11) uuterm-fb uuterm-x11
+ucfcomp: ucfcomp.c
+ $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $<
+clean:
+ rm -f $(CLEAN)