summaryrefslogtreecommitdiff
path: root/src/glut/fbdev/Makefile
blob: 4f70efe27946ddffed80efc66a1b69b550de0937 (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
78
79
80
81
82
83
84
85
86
87
# subset glut

TOP = ../../..
include $(TOP)/configs/current

GLX_SHARED = $(TOP)/src/glut/glx
SHAPES = $(TOP)/src/glut/mini

GLUT_MAJOR = 5
GLUT_MINOR = 0
GLUT_TINY = 1

INCLUDES = -I$(TOP)/include -I$(GLX_SHARED)

CORE_SOURCES = \
	fbdev.c \
	colormap.c \
	cursor.c \
	menu.c \
	overlay.c \
	ext.c \
	state.c \
	input.c \
	callback.c \
	gamemode.c \
	vidresize.c

GLX_SHARED_SOURCES = \
	$(GLX_SHARED)/glut_8x13.c \
	$(GLX_SHARED)/glut_9x15.c \
	$(GLX_SHARED)/glut_bwidth.c \
	$(GLX_SHARED)/glut_bitmap.c \
	$(GLX_SHARED)/glut_hel10.c \
	$(GLX_SHARED)/glut_hel12.c \
	$(GLX_SHARED)/glut_hel18.c \
	$(GLX_SHARED)/glut_tr10.c \
	$(GLX_SHARED)/glut_tr24.c \
	$(GLX_SHARED)/glut_mroman.c \
	$(GLX_SHARED)/glut_roman.c \
	$(GLX_SHARED)/glut_swidth.c \
	$(GLX_SHARED)/glut_stroke.c \
	$(TOP)/src/glut/mini/models.c \
	$(GLX_SHARED)/glut_teapot.c

SOURCES = $(CORE_SOURCES)  $(GLX_SHARED_SOURCES)

OBJECTS =  $(SOURCES:.c=.o)


##### RULES #####

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

.S.o:
	$(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES)  $< -o $@


##### TARGETS #####

default: depend $(TOP)/$(LIB_DIR)/$(GLUT_LIB_NAME)


# Make the library
$(TOP)/$(LIB_DIR)/$(GLUT_LIB_NAME): depend $(OBJECTS)
	$(TOP)/bin/mklib -o $(GLUT_LIB) -linker '$(CC)' \
		-major $(GLUT_MAJOR) -minor $(GLUT_MINOR) -patch $(GLUT_TINY) \
		$(GLUT_LIB_DEPS) -install $(TOP)/$(LIB_DIR) \
		$(MKLIB_OPTIONS) $(OBJECTS)

# Run 'make -f Makefile.solo dep' to update the dependencies if you change
# what's included by any source file.
depend: $(SOURCES) 
	touch depend
	$(MKDEP) $(MKDEP_OPTIONS) $(INCLUDES) $(SOURCES) > /dev/null 

# Emacs tags
tags:
	etags `find . -name \*.[ch]` `find ../include`


# Remove .o and backup files
clean: depend
	-rm -f depend
	-rm -f *.o *~ *.o *~ *.so libglut.so.3.7

include depend