| version 1.5, 2002/07/07 23:57:58 |
version 1.6, 2002/07/11 23:44:38 |
|
|
| |
|
| DESTDIR = $(HOME)/dipl |
DESTDIR = $(HOME)/dipl |
| |
|
| # Change to your system |
|
| #SYSTEM_DEFINES= -DSUN |
|
| |
|
| # Comment this definition if the XPM library does not exist on your |
# Comment this definition if the XPM library does not exist on your |
| # system |
# system |
| #XPM_DEFINE = -DXPMENABLED |
#XPM_DEFINE = -DXPMENABLED |
| Line 19 XPM_DEFINE = -DXPMENABLED |
|
| Line 16 XPM_DEFINE = -DXPMENABLED |
|
| |
|
| # Location where tcl.h can be found |
# Location where tcl.h can be found |
| #TCL_H = /usr/local/include |
#TCL_H = /usr/local/include |
| TCL_H = /usr/include/tcl8.3 |
#TCL_H = /usr/include/tcl8.3 |
| |
|
| # Location where tk.h can be found |
# Location where tk.h can be found |
| #TK_H = /usr/local/include |
#TK_H = /usr/local/include |
| Line 28 TCL_H = /usr/include/tcl8.3 |
|
| Line 25 TCL_H = /usr/include/tcl8.3 |
|
| # Location where X11 subtree of include files can be found |
# Location where X11 subtree of include files can be found |
| #X_H = /usr/include/X11 |
#X_H = /usr/include/X11 |
| |
|
| |
srcdir = . |
| |
LIB_DIR = lib/xgrafix |
| |
|
| # }}} |
# }}} |
| |
|
| ### Compiler flags {{{ |
### Compiler flags {{{ |
| |
|
| DEFINES = ${SYSTEM_DEFINES} ${XPM_DEFINE} |
#INCLUDES = -I$(TCL_H) -I$(TK_H) -I$(X_H) |
| |
DEFS = -DXGTCL=\"$(DESTDIR)/$(LIB_DIR)\" $(XPM_DEFINE) |
| EXTRA_INCLUDES = -I$(TCL_H) -I$(TK_H) -I$(X_H) |
#DEBUGFLAGS = -g -ggdb -DDEBUG |
| EXTRA_DEFINES = -DXGTCL=\"$(DESTDIR)/$(LIB_DIR)\" |
CFLAGS = -Wall -O2 $(DEBUGFLAGS) |
| CDEBUGFLAGS = -g -ggdb -DDEBUG |
LDFLAGS = |
| CFLAGS = $(CDEBUGFLAGS) $(EXTRA_DEFINES) $(EXTRA_INCLUDES) $(XPM_DEFINE) $(SYSTEM_DEFINES) |
|
| LDFLAGS = |
|
| |
|
| ### }}} |
### }}} |
| |
|
| # Compiler and other programs {{{ |
# Compiler and other programs {{{ |
| srcdir = . |
CC = gcc |
| CC = gcc |
CCC = $(CC) -c -I$(srcdir) $(CFLAGS) |
| CCLINK = $(CC) |
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) |
| CCC = $(CC) -c -I$(srcdir) $(CFLAGS) |
CCLD = $(CC) |
| |
LINK = $(CCLD) $(CFLAGS) $(LDFLAGS) -o $@ |
| CPP_MM = M |
|
| DEPEND_CFLAGS = -DPROTO -DDEPEND |
|
| CPP_DEPEND = $(CC) -I$(srcdir) -M$(CPP_MM) $(DEPEND_CFLAGS) |
|
| |
|
| AR = ar cr |
AR = ar |
| RANLIB = ranlib |
RANLIB = ranlib |
| LD = ld |
LD = ld |
| |
|
| RM = rm -f |
|
| |
|
| TAGS = ctags |
TAGS = ctags |
| |
|
| MKDIR = mkdir -p |
MKDIR = mkdir -p |
| |
|
| INSTALL = install |
INSTALL = install |
| Line 75 INST_APP_FLAGS = $(INST_DAT_FLAGS) |
|
| Line 68 INST_APP_FLAGS = $(INST_DAT_FLAGS) |
|
| |
|
| ### Names of the programs and targets {{{ |
### Names of the programs and targets {{{ |
| |
|
| SRC = ps6to1.c xgcommands.c xgcrosshair.c xginitc.c \ |
SOURCES = ps6to1.c \ |
| xginitf.c xginitvar.c xgmovie.c xgnox.c \ |
xgcommands.c \ |
| xgpaint2d.c xgpaint3d.c xgpaintvec.c xgpixmap.c \ |
xgcrosshair.c \ |
| xgprint.c xgprintgif.c xgreadrit.c xgrescale.c \ |
xginitc.c \ |
| xgsetup.c |
xginitf.c \ |
| |
xginitvar.c \ |
| HDR = xgdatamacros.h xgmini.h xgminint.h \ |
xgmovie.c \ |
| xgprintgif.h xgrafix.h xgrafixint.h |
xgnox.c \ |
| |
xgpaint2d.c \ |
| LIBCOBJS = \ |
xgpaint3d.c \ |
| objects/xgcrosshair.o \ |
xgpaintvec.c \ |
| objects/xginitc.o \ |
xgpixmap.c \ |
| objects/xginitvar.o \ |
xgprint.c \ |
| objects/xgpaint2d.o \ |
xgprintgif.c \ |
| objects/xgpaint3d.o \ |
xgreadrit.c \ |
| objects/xgpaintvec.o \ |
xgrescale.c \ |
| objects/xgpixmap.o \ |
xgsetup.c |
| objects/xgprint.o \ |
|
| objects/xgsetup.o \ |
HEADERS = xgdatamacros.h \ |
| objects/xgcommands.o \ |
xgmini.h \ |
| objects/xgreadrit.o \ |
xgminint.h \ |
| objects/xgrescale.o \ |
xgprintgif.h \ |
| objects/xgprintgif.o \ |
xgrafix.h \ |
| objects/xgmovie.o |
xgrafixint.h |
| |
|
| |
OBJECTS = objects/xgcrosshair.o \ |
| |
objects/xginitc.o \ |
| |
objects/xginitvar.o \ |
| |
objects/xgpaint2d.o \ |
| |
objects/xgpaint3d.o \ |
| |
objects/xgpaintvec.o \ |
| |
objects/xgpixmap.o \ |
| |
objects/xgprint.o \ |
| |
objects/xgsetup.o \ |
| |
objects/xgcommands.o \ |
| |
objects/xgreadrit.o \ |
| |
objects/xgrescale.o \ |
| |
objects/xgprintgif.o \ |
| |
objects/xgmovie.o |
| |
|
| |
PS6_OBJECTS = objects/ps6to1.o |
| |
|
| TCL_SRC = xgdialogs250.tcl xginit250.tcl xgsetup250.tcl xgdebug250.tcl |
TCL_SOURCES = xgdialogs250.tcl xginit250.tcl xgsetup250.tcl xgdebug250.tcl |
| |
|
| libxgrafix_LIB = libXGC250 |
libxgrafix_LIB = libXGC250 |
| libxgrafix_STATIC_LIB = $(libxgrafix_LIB).a |
libxgrafix_STATIC_LIB = $(libxgrafix_LIB).a |
| libxgrafix_DYNAMIC_LIB = $(libxgrafix_LIB).so |
libxgrafix_DYNAMIC_LIB = $(libxgrafix_LIB).so |
| |
|
| LIB_DIR = lib/xgrafix |
|
| |
|
| PS6TO1OBJS = objects/ps6to1.o |
|
| ### }}} |
### }}} |
| |
|
| all: objects ps6to1 static dynamic |
all: ps6to1 static dynamic |
| |
|
| |
|
| |
ps6to1: $(PS6_OBJECTS) |
| |
$(LINK) $(PS6_OBJECTS) |
| |
|
| |
static: $(libxgrafix_STATIC_LIB) |
| |
|
| |
dynamic: $(libxgrafix_DYNAMIC_LIB) |
| |
|
| |
|
| |
$(libxgrafix_STATIC_LIB): $(OBJECTS) |
| |
$(AR) r $@ $(OBJECTS) |
| |
|
| |
$(libxgrafix_DYNAMIC_LIB): $(OBJECTS) |
| |
$(LD) $(LDFLAGS) -shared -o $@ $(OBJECTS) |
| |
|
| |
|
| |
DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :) |
| |
OBJECTS_MAGIC := $(shell mkdir objects > /dev/null 2>&1 || :) |
| |
|
| |
clean: |
| |
-rm -f *.o core *~ |
| |
-rm -f TAGS tags ps6to1 $(libxgrafix_STATIC_LIB) $(libxgrafix_DYNAMIC_LIB) |
| |
-rm -rf objects/ .deps/ |
| |
|
| |
tags: |
| |
$(TAGS) -o TAGS *.[ch] |
| |
|
| |
objects/%.o: %.c $(CONFIG_HEADER) |
| |
@echo '$(COMPILE) -c $<'; \ |
| |
$(COMPILE) -Wp,-MD,.deps/$(*F).pp -o $@ -c $< |
| |
@-cp .deps/$(*F).pp .deps/$(*F).P; \ |
| |
tr ' ' '\012' < .deps/$(*F).pp \ |
| |
| sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \ |
| |
>> .deps/$(*F).P; \ |
| |
rm .deps/$(*F).pp |
| |
|
| ### Install part {{{ |
### Install part {{{ |
| install: objects \ |
install: objects \ |
| install_ps6to1 \ |
install_ps6to1 \ |
| install_lib \ |
install_lib \ |
| install_header \ |
install_header \ |
| install_tcl \ |
install_tcl \ |
| install_icon |
install_icon |
| |
|
| install_ps6to1: ps6to1 |
install_ps6to1: ps6to1 |
| @if [ -d $(DESTDIR)/bin ]; then set +x; \ |
@if [ -d $(DESTDIR)/bin ]; then set +x; \ |
| Line 141 install_header: xgrafix.h |
|
| Line 184 install_header: xgrafix.h |
|
| $(INSTALL) $(INST_ALL_FLAGS) $(INST_DAT_FLAGS) \ |
$(INSTALL) $(INST_ALL_FLAGS) $(INST_DAT_FLAGS) \ |
| xgrafix.h $(DESTDIR)/include/xgrafix.h |
xgrafix.h $(DESTDIR)/include/xgrafix.h |
| |
|
| install_tcl: $(TCL_SRC) |
install_tcl: $(TCL_SOURCES) |
| @if [ -d $(DESTDIR)/$(LIB_DIR) ]; then set +x; \ |
@if [ -d $(DESTDIR)/$(LIB_DIR) ]; then set +x; \ |
| else (set -x; $(MKDIR) $(INST_DIR_FLAGS) $(DESTDIR)/$(LIB_DIR)); fi |
else (set -x; $(MKDIR) $(INST_DIR_FLAGS) $(DESTDIR)/$(LIB_DIR)); fi |
| @for TCLFILE in $(TCL_SRC) ; do \ |
@for TCLFILE in $(TCL_SOURCES) ; do \ |
| echo "$(INSTALL) $(INST_ALL_FLAGS) $(INST_DAT_FLAGS) \ |
echo "$(INSTALL) $(INST_ALL_FLAGS) $(INST_DAT_FLAGS) \ |
| $$TCLFILE $(DESTDIR)/$(LIB_DIR)/$$TCLFILE" ; \ |
$$TCLFILE $(DESTDIR)/$(LIB_DIR)/$$TCLFILE" ; \ |
| $(INSTALL) $(INST_ALL_FLAGS) $(INST_DAT_FLAGS) \ |
$(INSTALL) $(INST_ALL_FLAGS) $(INST_DAT_FLAGS) \ |
|
|
| $(INSTALL) $(INST_ALL_FLAGS) $(INST_DAT_FLAGS) \ |
$(INSTALL) $(INST_ALL_FLAGS) $(INST_DAT_FLAGS) \ |
| xgrafix.ico $(DESTDIR)/$(LIB_DIR)/xgrafix.ico |
xgrafix.ico $(DESTDIR)/$(LIB_DIR)/xgrafix.ico |
| ### End of Install part }}} |
### End of Install part }}} |
| |
|
| ps6to1: $(PS6TO1OBJS) |
|
| $(CCLINK) -o $@ $(PS6TO1OBJS) |
|
| |
|
| static: $(libxgrafix_STATIC_LIB) |
|
| |
|
| dynamic: $(libxgrafix_DYNAMIC_LIB) |
|
| |
|
| $(libxgrafix_STATIC_LIB): $(LIBCOBJS) |
|
| $(AR) $@ $(LIBCOBJS) |
|
| $(RANLIB) $@ |
|
| |
|
| $(libxgrafix_DYNAMIC_LIB): $(LIBCOBJS) |
|
| $(LD) $(LDFLAGS) -shared -o $@ $(LIBCOBJS) |
|
| |
|
| objects: |
|
| mkdir objects |
|
| |
|
| clean: |
|
| $(RM) *.o core *~ ps6to1 $(libxgrafix_STATIC_LIB) $(libxgrafix_DYNAMIC_LIB) Makefile.dep |
|
| $(RM) -r objects/ |
|
| |
|
| tags: |
|
| $(TAGS) -o TAGS *.[ch] |
|
| |
|
| depend: |
|
| make Makefile.dep |
|
| |
|
| Makefile.dep: Makefile |
|
| @echo "Generating dependencies to file Makefile.dep" |
|
| @echo "###############################################" > Makefile.dep |
|
| @echo "### dependencies generated by 'make depend' ###" >> Makefile.dep |
|
| @echo "### ###" >> Makefile.dep |
|
| @echo "### This file is included in Makefile ###" >> Makefile.dep |
|
| @echo "###############################################" >> Makefile.dep |
|
| -@for i in $(SRC); do \ |
|
| $(CPP_DEPEND) $$i | \ |
|
| sed -e 's+^\([^ ]*\.o\)+objects/\1+' >> Makefile.dep; \ |
|
| echo " \$$(CCC) -o \$$@ $$i" >> Makefile.dep; \ |
|
| done |
|
| |
|
| ### Include dependencies |
|
| -include Makefile.dep |
|