OBJS = main.o mymath.o mastermind.o guiglobal.o apptogui.o guitoapp.o mainwindowdesign.o CC = gcc .if exists(${X11BASE}/include/X11/forms.h) XFORMSINC=-I${X11BASE}/include/X11 .endif CFLAGS+= -Wall -Wpointer-arith -Wstrict-prototypes -pedantic -ansi -I${X11BASE}/include ${XFORMSINC} CLIBS = -lm #GRAPHLIBS = -lforms -L/usr/X11R6/lib/ -lX11 -static GRAPHLIBS = -lforms -L${X11BASE}/lib -lX11 -lXpm MF = Makefile ALLLIBS = $(GRAPHLIBS) $(CLIBS) all: xmastermind $(MF) all_new: clean all # only for linking xmastermind: $(OBJS) $(MF) $(CC) $(CFLAGS) -o xmastermind $(OBJS) $(ALLLIBS) # main.c contains the global control functions main.o: main.c configure.h mastermind.h apptogui.h $(MF) $(CC) $(CFLAGS) -c main.c # mastermind.c is the part of the program that provides all # the functions for mastermind that don't use # graphics (calculation of the answer, calculation # of the left possible combinations...) mastermind.o: mastermind.c mastermind.h apptogui.h configure.h list.h mymath.h types.h debug.h $(MF) $(CC) $(CFLAGS) -c mastermind.c # apptogui.c provides functions for the output and # calls functions from the mastermind.c like: user_entered_new_try # this module should contain all the interaction with the user # in the mainwindow of the application. # If you want to port the program to an other widgetset you # have to adapt the functions in this module apptogui.o: apptogui.c apptogui.h configure.h mainwindowdesign.h guiglobal.h $(MF) $(CC) $(CFLAGS) -c apptogui.c # guitoapp.c provides all callback functions that the GUI calls guitoapp.o: guitoapp.c mastermind.h mainwindowdesign.h guiglobal.h $(MF) $(CC) $(CFLAGS) -c guitoapp.c # provides the space for the mainwindow and access to it guiglobal.o: guiglobal.h guiglobal.c mainwindowdesign.h $(MF) $(CC) $(CFLAGS) -c guiglobal.c # provides mathematical functions mymath.o: mymath.c mymath.h list.h types.h configure.h debug.h $(MF) $(CC) $(CFLAGS) -c mymath.c # mainwindowdesign.[ch] are generated by fdesign from mainwindowdesign.fd # they are generated new if you save in fdesign mainwindowdesign.o: mainwindowdesign.c mainwindowdesign.h $(MF) $(CC) $(CFLAGS) -c mainwindowdesign.c clean: rm -f xmastermind rm -f *.o rm -f *~ rm -f *.bak rm -rf TAGS