summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/hitexdir/hintview/src/Makefile
blob: fc1e262a4315d68e1bce22f27d7b8cb8bfa74653 (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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77

CC = gcc
CFLAGS = -g -Og -DDEBUG -Wall
LDFLAGS = -g -Og
#GL_DEFINES = -DGLEW_STATIC -DTW_NO_DIRECT3D -DTW_NO_LIB_PRAGMA -DTW_STATIC -D_CRT_SECURE_NO_WARNINGS

FT_INCLUDES = -I/usr/include/freetype2
GL_INCLUDES = $(FT_INCLUDES)


HFILES =     hint.h htex.h format.h get.h basetypes.h error.h \
	     hrender.h rendernative.h hfonts.h

WFILES =     format.w hint.w htex.ch btex.w

HINT_FILES = get.c hint.c tables.c htex.c hrender.c hfonts.c \
	     $(HFILES) $(WFILES)


OBJ=main.o  renderOGL.o get.o hint.o tables.o htex.o hrender.o hfonts.o

ifeq (Msys,$(shell uname -o))
LIBS= ../external/glfw-3.1.2/msys.build/src/libglfw3.a ../external/libglew.a  -lfreetype \
	       -lm -lz
#	 -ldl -lm -lX11 -lpthread -lXrandr -lXinerama -lXi -lXcursor -lGL -lz
else
LIBS= -lglfw -lGLEW -ldl -lfreetype -lX11 -lXrandr -lXinerama -lXi -lXcursor -lGL -lz -lpthread -lm 
endif

all: hintview

.SUFFIXES:


hint.o: hint.c
	$(CC) $(CFLAGS) -Wno-unused-but-set-variable -o $@ -c $<

htex.o: htex.c
	$(CC) $(CFLAGS) -Wno-parentheses -Wno-unused-but-set-variable -Wno-maybe-uninitialized -o $@ -c $<

renderOGL.o: renderOGL.c
	$(CC) $(FT_INCLUDES) $(CFLAGS) -o $@ -c $<

hfonts.o: hfonts.c
	$(CC) $(CFLAGS) $(FT_INCLUDES) -o $@ -c $<

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

hintview: $(OBJ)
	$(CC) $(LDFLAGS)  $(OBJ) $(LIBS) -o $@ 

SRC= $(OBJ:.o=.c) $(HFILES) main.h stb_image.h Makefile
DIST_SRC = $(SRC:%=src/%)
DIST_MAN = man/hintview.1

hintview.tgz: 
	tar -c -C .. --transform 's,^,hintview/,' -z -f $@ $(DIST_SRC) $(DIST_MAN) 

BINDIR=/usr/local/bin
MANDIR=/usr/local/man

install: hintview
	strip hintview
	install -t $(BINDIR) --mode=755 hintview
	install -t $(MANDIR)/man1 --mode=644 ../man/hintview.1


.PHONY: www
www: hintview hintview.tgz
	cp hintview hintview.tgz ../man/hintview.1 ../../www/linux/

clean:
	rm -f *.o *~ *.dvi *.log *.aux
	rm -f hintview hintview.tgz
	$(MAKE) -C ../../hint viewlinux || true