FLTK logo

Article #1286: Simple FLTK MinGW Makefile

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  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 13:30 Jan 28, 2013 by xecronix

Last modified at 13: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-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.