# Copyright (C) 1996 Keith Whitwell. # This file may only be copied under the terms of the GNU Library General # Public License - see the file COPYING in the lib3d distribution. # MSDOS makefile for djgpp v2 and GNU make # Contributed by Markus F.X.J. Oberhumer # This files gets included by the various Makefile.dj2 #----------------------------------------------------------------------------- # Add or uncomment directives appropriate for your system below. #----------------------------------------------------------------------------- .PHONY: default all lib .PHONY: assembly depend cleanlib clean distclean tags # where is lib3d installed? # This looks silly, but is always referenced one directory down from here. top_srcdir=.. top_builddir=.. # suffixes E := .exe O := .o A := .a CXX = gcc CC = $(CXX) RM = rm -f # name of the libraries LIB3D = $(top_builddir)/src/lib3d.a LIBPRIMITIVE = $(top_builddir)/primitive/libprimitive.a # debugging gcc # BUILDFLAGS = -g -fno-inline # BUILDLIBS = # LDFLAGS = -g # # profiling gcc # BUILDFLAGS = -pg -O2 -DNO_DEBUG -DPROFILING # BUILDLIBS = -pg # LDFLAGS = # # optimizing gcc BUILDFLAGS = -O2 -fno-strength-reduce -fomit-frame-pointer -ffast-math BUILDFLAGS += -DNO_DEBUG BUILDLIBS = LDFLAGS = -s # # generic # BUILDFLAGS = -O -DNO_DEBUG # BUILDLIBS = # LDFLAGS = BUILDFLAGS += -Wall -Winline -Wpointer-arith BUILDFLAGS += -Wcast-align -Wbad-function-cast # BUILDFLAGS += -Wcast-qual BUILDFLAGS += -Wwrite-strings CXX_BUILDFLAGS += -fconserve-space # Generic default: ARCHFLAGS = # Extra include directories? # Extra site specific libraries? # Extra devices? # Extra platform dependent test apps? # # EXTRAINCLUDES= # EXTRALIBS= # EXTRADEVICES= # EXTRATARGETS= INCLUDES = -I$(top_srcdir)/include $(BUILDINCLUDES) $(EXTRAINCLUDES) CFLAGS = $(ARCHFLAGS) $(BUILDFLAGS) $(INCLUDES) CXXFLAGS = $(ARCHFLAGS) $(BUILDFLAGS) $(CXX_BUILDFLAGS) $(INCLUDES) LIBS = $(BUILDLIBS) $(EXTRALIBS) -lalleg -liostream -lm CLEAN_FILES = *.o *.obj *.a *.lib *.s *.err *.map *.d DISTCLEAN_FILES = TAGS depend.mkf # Rule to build assembly for your viewing pleasure. # note - make clean will remove all .s files, so change this if you # add real assembly files. .cc.s: $(CXX) -S $(ARCHFLAGS) $(BUILDFLAGS) $(INCLUDES) -o asm.tmp $< cxxfilt < asm.tmp > $@ -$(RM) asm.tmp