Brian Paul | de0ee31 | 2004-03-26 15:19:11 +0000 | [diff] [blame^] | 1 | # subset glut |
| 2 | |
| 3 | TOP = ../../.. |
| 4 | include $(TOP)/configs/current |
| 5 | |
| 6 | MARK = $(TOP)/src/glut/glx |
| 7 | |
| 8 | GLUT_MAJOR = 3 |
| 9 | GLUT_MINOR = 7 |
| 10 | GLUT_TINY = 1 |
| 11 | |
| 12 | INCLUDES = -I$(TOP)/include -I$(MARK) |
| 13 | |
| 14 | CORE_SOURCES = \ |
| 15 | bitmap.c \ |
| 16 | callback.c \ |
| 17 | color.c \ |
| 18 | globals.c \ |
| 19 | init.c \ |
| 20 | menu.c \ |
| 21 | models.c \ |
| 22 | overlay.c \ |
| 23 | state.c \ |
| 24 | teapot.c \ |
| 25 | window.c |
| 26 | |
| 27 | |
| 28 | MARK_SOURCES = \ |
| 29 | $(MARK)/glut_8x13.c \ |
| 30 | $(MARK)/glut_9x15.c \ |
| 31 | $(MARK)/glut_hel10.c \ |
| 32 | $(MARK)/glut_hel12.c \ |
| 33 | $(MARK)/glut_hel18.c \ |
| 34 | $(MARK)/glut_tr10.c \ |
| 35 | $(MARK)/glut_tr24.c |
| 36 | |
| 37 | SOURCES = $(CORE_SOURCES) $(MARK_SOURCES) |
| 38 | |
| 39 | OBJECTS = $(SOURCES:.c=.o) |
| 40 | |
| 41 | |
| 42 | ##### RULES ##### |
| 43 | |
| 44 | .c.o: |
| 45 | $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@ |
| 46 | |
| 47 | .S.o: |
| 48 | $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@ |
| 49 | |
| 50 | |
| 51 | ##### TARGETS ##### |
| 52 | |
| 53 | default: depend $(LIB_DIR)/$(GLUT_LIB_NAME) |
| 54 | |
| 55 | |
| 56 | # Make the library |
| 57 | $(LIB_DIR)/$(GLUT_LIB_NAME): depend $(OBJECTS) |
| 58 | $(TOP)/bin/mklib -o $(GLUT_LIB) \ |
| 59 | -major $(GLUT_MAJOR) -minor $(GLUT_MINOR) \ |
| 60 | -patch $(GLUT_TINY) $(GLUT_LIB_DEPS) -install $(LIB_DIR) \ |
| 61 | $(MKLIB_OPTIONS) $(OBJECTS) |
| 62 | |
| 63 | |
| 64 | # Run 'make -f Makefile.solo dep' to update the dependencies if you change |
| 65 | # what's included by any source file. |
| 66 | depend: $(SOURCES) |
| 67 | touch depend |
| 68 | makedepend -fdepend -Y $(INCLUDES) $(SOURCES) >& /dev/null |
| 69 | |
| 70 | # Emacs tags |
| 71 | tags: |
| 72 | etags `find . -name \*.[ch]` `find ../include` |
| 73 | |
| 74 | |
| 75 | # Remove .o and backup files |
| 76 | clean: depend |
| 77 | -rm -f depend |
| 78 | -rm -f *.o *~ *.o *~ *.so libglut.so.3.7 |
| 79 | |
| 80 | include depend |