From: genocide AT praxis DOT net (GENOCiDE) Newsgroups: comp.os.msdos.djgpp Subject: I need help with Makefiles in DJGPP v2.01 Date: Thu, 16 Jan 1997 21:15:34 GMT Organization: Praxis Information Group Lines: 202 Message-ID: <32de99b3.4811402@news.praxis.net> NNTP-Posting-Host: ptp11.praxis.net To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp I got this makefile for the IJG JPEG source from Tom Lane, the author. It seems as thought this makefile is for DJGPP v2.0 or something, and it won't work under v2.01....if you find the error or errors in this makefile, please respond in comp.os.msdos.djgpp thank you! -Brad House Cut Here-------------------------------------------------------- # Makefile for Independent JPEG Group's software VPATH=. # This makefile is for DJGPP v2.0 (Delorie's GNU C port) on MS-DOS. # Tested on jpeg-6a by Frank J. Donahoe. # Read installation instructions before saying "make -f makefile.dj2" !! # The name of your C compiler: CC= gcc # You may need to adjust these cc options: CFLAGS= -MMD -O2 -Wall -I. # Generally, we recommend defining any configuration symbols in jconfig.h, # NOT via -D switches here. # Link-time cc options: LDFLAGS= $(CFLAGS) # To link any special libraries, add the necessary -l commands here. LDLIBS= -L. -ljpeg # Put here the object file name for the correct system-dependent memory # manager file. For DJGPP this is usually jmemnobs.o, but you could # use jmemname.o if you want to use named temp files instead of swap space. SYSDEPMEM= jmemnobs.o # miscellaneous OS-dependent stuff # If install.exe is not found, change to copy /Y INSTALL=install # linker LD= $(CC) -s -o # File deletion command. The default is "rm -f." If "rm.exe" is not found # uncomment the following: # RM= del # library (.a) file creation command AR= ar rcs # End of configurable options. # source files: JPEG library proper LIBSOURCES= jcapimin.c jcapistd.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c \ jcinit.c jcmainct.c jcmarker.c jcmaster.c jcomapi.c jcparam.c \ jcphuff.c jcprepct.c jcsample.c jctrans.c jdapimin.c jdapistd.c \ jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c jddctmgr.c jdhuff.c \ jdinput.c jdmainct.c jdmarker.c jdmaster.c jdmerge.c jdphuff.c \ jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c jfdctfst.c \ jfdctint.c jidctflt.c jidctfst.c jidctint.c jidctred.c jquant1.c \ jquant2.c jutils.c jmemmgr.c # memmgr back ends: compile only one of these into a working library SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c # source files: cjpeg/djpeg/jpegtran applications, also rdjpgcom/wrjpgcom APPSOURCES= cjpeg.c djpeg.c jpegtran.c cdjpeg.c rdcolmap.c rdswitch.c \ rdjpgcom.c wrjpgcom.c rdppm.c wrppm.c rdgif.c wrgif.c rdtarga.c \ wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES) # files included by source files INCLUDES= jchuff.h jdhuff.h jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h \ jpegint.h jpeglib.h jversion.h cdjpeg.h cderror.h # documentation, test, and support files DOCS= README install.doc usage.doc cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \ wrjpgcom.1 wizard.doc example.c libjpeg.doc structure.doc \ coderules.doc filelist.doc change.log MKFILES= configure makefile.cfg makefile.ansi makefile.unix makefile.bcc \ makefile.mc6 makefile.dj makefile.wat makcjpeg.st makdjpeg.st \ makljpeg.st maktjpeg.st makefile.manx makefile.sas makefile.mms \ makefile.vms makvms.opt CONFIGFILES= jconfig.cfg jconfig.manx jconfig.sas jconfig.st jconfig.bcc \ jconfig.mc6 jconfig.dj jconfig.wat jconfig.vms OTHERFILES= jconfig.doc ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm TESTFILES= testorig.jpg testimg.ppm testimg.gif testimg.jpg testprog.jpg \ testimgp.jpg DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) \ $(OTHERFILES) $(TESTFILES) # library object files common to compression and decompression COMOBJECTS= jcomapi.o jutils.o jerror.o jmemmgr.o $(SYSDEPMEM) # compression library object files CLIBOBJECTS= jcapimin.o jcapistd.o jctrans.o jcparam.o jdatadst.o jcinit.o \ jcmaster.o jcmarker.o jcmainct.o jcprepct.o jccoefct.o jccolor.o \ jcsample.o jchuff.o jcphuff.o jcdctmgr.o jfdctfst.o jfdctflt.o \ jfdctint.o # decompression library object files DLIBOBJECTS= jdapimin.o jdapistd.o jdtrans.o jdatasrc.o jdmaster.o \ jdinput.o jdmarker.o jdhuff.o jdphuff.o jdmainct.o jdcoefct.o \ jdpostct.o jddctmgr.o jidctfst.o jidctflt.o jidctint.o jidctred.o \ jdsample.o jdcolor.o jquant1.o jquant2.o jdmerge.o # These objectfiles are included in libjpeg.a LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS) LIBS= libjpeg.a HEADERS= jconfig.h jpeglib.h jmorecfg.h jerror.h # object files for sample applications (excluding library files) APPOBJECTS= cjpeg.o djpeg.o jpegtran.o cdjpeg.o rdcolmap.o rdswitch.o \ rdjpgcom.o wrjpgcom.o rdppm.o wrppm.o rdgif.o wrgif.o rdtarga.o \ wrtarga.o rdbmp.o wrbmp.o rdrle.o wrrle.o cjpegobj= cjpeg.o rdppm.o rdgif.o rdtarga.o rdrle.o rdbmp.o rdswitch.o \ cdjpeg.o djpegobj= djpeg.o wrppm.o wrgif.o wrtarga.o wrrle.o wrbmp.o rdcolmap.o \ cdjpeg.o jpegtranobj= jpegtran.o rdswitch.o cdjpeg.o rdjpgcomobj= rdjpgcom.o wrjpgcomobj= wrjpgcom.o all: objects libjpeg.a cjpeg.exe djpeg.exe jpegtran.exe rdjpgcom.exe wrjpgcom.exe objects: $(LIBOBJECTS) $(APPOBJECTS) %.o : %.c $(CC) $(CFLAGS) -c $< -o $@ libjpeg.a: $(LIBOBJECTS) $(RM) $@ $(AR) $@ $(LIBOBJECTS) %.exe : $(APPOBJECTS) $(LIBS) $(LD) $@ $($*obj) $(LDLIBS) # jconfig.h: jconfig.doc # echo You must prepare a system-dependent jconfig.h file. # echo Please read the installation directions in install.doc. # exit 1 # INCLUDE_PATH and LIBRARY_PATH were set for [make] in djgpp.env. # Otherwise, they must be defined above. install: $(HEADERS) $(LIBS) $(INSTALL) $(HEADERS) $(INCLUDE_PATH) $(INSTALL) $(LIBS) $(LIBRARY_PATH) uninstall: cd $(LIBRARY_PATH); $(RM) $(LIBS) cd $(INCLUDE_PATH); $(RM) $(HEADERS) clean: $(RM) *.d *.o *.bak $(RM) *.exe $(RM) libjpeg.a $(RM) testout*.* test: $(RM) testout*.* djpeg -dct int -ppm -outfile testout.ppm testorig.jpg djpeg -dct int -gif -outfile testout.gif testorig.jpg cjpeg -dct int -outfile testout.jpg testimg.ppm djpeg -dct int -ppm -outfile testoutp.ppm testprog.jpg cjpeg -dct int -progressive -opt -outfile testoutp.jpg testimg.ppm jpegtran -outfile testoutt.jpg testprog.jpg fc /b testimg.ppm testout.ppm fc /b testimg.gif testout.gif fc /b testimg.jpg testout.jpg fc /b testimg.ppm testoutp.ppm fc /b testimgp.jpg testoutp.jpg fc /b testorig.jpg testoutt.jpg DEPS := $(wildcard *.d) ifneq ($(DEPS),) include $(DEPS) endif Cut Here--------------------------------------------------------