Article #1286: Simple FLTK MinGW Makefile

   
  FLTK Apps      FLTK Library      Forums      Links     Login 
 Home  |  Articles & FAQs  |  Bugs & Features  |  Documentation  |  Download  |  Screenshots  ]
 

Return to Articles | Show Comments | Submit Comment ]

Article #1286: Simple FLTK MinGW Makefile

Created at 16:30 Jan 28, 2013 by xecronix

Last modified at 16:31 Jan 28, 2013

# Makefile for building simple FLTK programs
# using MinGW on the windows platform.

# I recommend setting C:\MinGW\bin AND C:\MinGW\msys\1.0\bin 
# in the environment %PATH% variable on the development machine.

MINGW=C:/MinGW
MSYS=${MINGW}/msys/1.0
FLTK_CONFIG=${MSYS}/local/bin/fltk-config
INCLUDE=-I${MSYS}/local/include
LIBS=-L${MSYS}/local/lib 
CC=${MINGW}/bin/g++.exe
RM=${MSYS}/bin/rm
LS=${MSYS}/bin/ls
EXE=dynamic_buttons_scroll.exe

SRC=$(shell ${LS} *.cxx)
OBJS=$(SRC:.cxx=.o)
CFLAGS=${INCLUDE} `${FLTK_CONFIG} --cxxflags`
LINK=${LIBS} `${FLTK_CONFIG} --ldflags`

all:${OBJS}
        ${CC} ${OBJS} ${LINK} -o ${EXE}

%.o: %.cxx
        ${CC} ${INCLUDE} ${CFLAGS} -c $*.cxx -o $*.o

clean:
        - ${RM} ${EXE}
        - ${RM} ${OBJS}

tidy: all
        - ${RM} ${OBJS}

rebuild: clean all

# Remember, all indentations must be tabs... not spaces.
# http://www.techport80.com
Listing ]

Comments

Submit Comment ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2012 by Bill Spitzak and others. This project is hosted by Seriss Corporation. Please report site problems to 'erco@seriss.com'.