include ../VERSION
include ../install.inc
include ../sysdep.inc

DEBUG       = -DDEBUG

# executable extenstion
EXEEXT=

CXXFLAGS    = \
	$(I18N) $(DEBUG) $(OS2)\
	-DLIBDIR='"$(LIBDIR)"' \
	-DCONFIGDIR='"$(ETCDIR)"' \
	-DVERSION='"$(VERSION)"' \
	-DEXEEXT='"$(EXEEXT)"' \
        $(SYS_CFLAGS) $(SYS_INCDIRS)
LFLAGS      = 
LIBS        = $(SYS_LIBDIRS) $(SYS_LIBS)

COREOBJS    = \
        app.o timer.o window.o graphics.o tooltip.o \
        menu.o scrollbar.o button.o listbox.o \
        misc.o option.o icons.o dialogs.o

OBJS        = $(COREOBJS) \
        icewm.o root.o client.o \
        frame.o decorate.o framebutton.o miniicon.o title.o movesize.o \
        winlist.o status.o switch.o themes.o \
        taskbar.o progmenu.o mailbox.o clock.o browse.o cpustatus.o \
        gnome.o

ICEWMHINTOBJS = icewmhint.o

ICEWMBGOBJS = icewmbg.o

ICESOUNDOBJS = icesound.o misc.o 

ICECLOCKOBJS = $(COREOBJS) \
          iceclock.o clock.o cpustatus.o

ICELISTOBJS = $(COREOBJS) \
             icelist.o clock.o

ICEBAROBJS = $(COREOBJS) \
	icebar.o taskbar.o progmenu.o mailbox.o clock.o browse.o

PROGRAMS    = icewm$(EXEEXT) icewmhint$(EXEEXT) icewmbg$(EXEEXT) #icelist$(EXEEXT) #iceclock$(EXEEXT) #icebar$(EXEEXT) #icesound$(EXEEXT) 

.SUFFIXES:
.SUFFIXES: .cc .o .h

.cc.o:
	$(CXX) $(CXXFLAGS) -c $<

all: $(PROGRAMS)

clean:
	rm -f $(PROGRAMS) *.o *~

icewm$(EXEEXT): $(OBJS)
	$(LD) -o $@ $(LFLAGS) $(OBJS) $(LIBS)

icewmhint$(EXEEXT): $(ICEWMHINTOBJS)
	$(LD) -o $@ $(LFLAGS) $(ICEWMHINTOBJS) $(LIBS)

icewmbg$(EXEEXT): $(ICEWMBGOBJS)
	$(LD) -o $@ $(LFLAGS) $(ICEWMBGOBJS) $(LIBS)

icesound$(EXEEXT): $(ICESOUNDOBJS)
	$(LD) -o $@ $(LFLAGS) $(ICESOUNDOBJS) $(LIBS)

iceclock$(EXEEXT): $(ICECLOCKOBJS)
	$(LD) -o $@ $(LFLAGS) $(ICECLOCKOBJS) $(LIBS)

icelist$(EXEEXT): $(ICELISTOBJS)
	$(LD) -o $@ $(LFLAGS) $(ICELISTOBJS) $(LIBS)

icebar$(EXEEXT): $(ICEBAROBJS)
	$(LD) -o $@ $(LFLAGS) $(ICEBAROBJS) $(LIBS)

depend:
	gccmakedep *.cc

# DO NOT DELETE
app.o: app.cc icewm.h config.h MwmUtil.h WinMgr.h default.h

browse.o: browse.cc icewm.h config.h MwmUtil.h WinMgr.h default.h

button.o: button.cc icewm.h config.h MwmUtil.h WinMgr.h default.h

client.o: client.cc icewm.h config.h MwmUtil.h WinMgr.h default.h

clock.o: clock.cc icewm.h config.h MwmUtil.h WinMgr.h default.h

cpustatus.o: cpustatus.cc icewm.h config.h MwmUtil.h WinMgr.h default.h

decorate.o: decorate.cc icewm.h config.h MwmUtil.h WinMgr.h default.h

dialogs.o: dialogs.cc icewm.h config.h MwmUtil.h WinMgr.h default.h

frame.o: frame.cc icewm.h config.h MwmUtil.h WinMgr.h default.h

framebutton.o: framebutton.cc icewm.h config.h MwmUtil.h WinMgr.h default.h

graphics.o: graphics.cc icewm.h config.h MwmUtil.h WinMgr.h default.h

icebar.o: icebar.cc icewm.h config.h MwmUtil.h WinMgr.h default.h

iceclock.o: iceclock.cc icewm.h config.h MwmUtil.h WinMgr.h default.h

icesound.o: icesound.cc icewm.h config.h MwmUtil.h WinMgr.h default.h

icewm.o: icewm.cc icewm.h config.h MwmUtil.h WinMgr.h default.h

icewmhint.o: icewmhint.cc icewm.h config.h MwmUtil.h WinMgr.h default.h

icons.o: icons.cc icewm.h config.h MwmUtil.h WinMgr.h default.h

listbox.o: listbox.cc icewm.h config.h MwmUtil.h WinMgr.h default.h

mailbox.o: mailbox.cc icewm.h config.h MwmUtil.h WinMgr.h default.h

menu.o: menu.cc icewm.h config.h MwmUtil.h WinMgr.h default.h

miniicon.o: miniicon.cc icewm.h config.h MwmUtil.h WinMgr.h default.h

misc.o: misc.cc icewm.h icewm.h config.h MwmUtil.h WinMgr.h default.h

movesize.o: movesize.cc icewm.h config.h MwmUtil.h WinMgr.h default.h

option.o: option.cc icewm.h config.h MwmUtil.h WinMgr.h default.h

progmenu.o: progmenu.cc icewm.h config.h MwmUtil.h WinMgr.h default.h

root.o: root.cc icewm.h icewm.h config.h MwmUtil.h WinMgr.h default.h

scrollbar.o: scrollbar.cc icewm.h config.h MwmUtil.h WinMgr.h default.h

status.o: status.cc icewm.h config.h MwmUtil.h WinMgr.h default.h

switch.o: switch.cc icewm.h config.h MwmUtil.h WinMgr.h default.h

taskbar.o: taskbar.cc icewm.h config.h MwmUtil.h WinMgr.h default.h

timer.o: timer.cc icewm.h config.h MwmUtil.h WinMgr.h default.h

title.o: title.cc icewm.h config.h MwmUtil.h WinMgr.h default.h

tooltip.o: tooltip.cc icewm.h config.h MwmUtil.h WinMgr.h default.h

window.o: window.cc icewm.h config.h MwmUtil.h WinMgr.h default.h

winlist.o: winlist.cc icewm.h config.h MwmUtil.h WinMgr.h default.h

wmc.o: wmc.cc icewm.h config.h MwmUtil.h WinMgr.h default.h
