makefile.dj 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #
  2. # Makefile for DJGPP - unrar
  3. #
  4. # Note: you have to 'make clean' before you can build
  5. # the sfx module
  6. #
  7. # DOS32 using DJGPP 2.03 Patchlevel 2 and GCC 2.95.3
  8. CXX = gpp
  9. CXXFLAGS = -O2 -Wno-deprecated
  10. #DEFINES = -D_MSC_VER -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
  11. ##########################
  12. .PHONY: all clean veryclean
  13. COMPILE=$(CXX) $(CXXFLAGS) $(DEFINES)
  14. LINK=$(CXX)
  15. UNRAR_OBJ=filestr.o recvol.o rs.o scantree.o
  16. OBJECTS=rar.o strlist.o strfn.o pathfn.o savepos.o smallfn.o global.o \
  17. file.o filefn.o filcreat.o archive.o arcread.o unicode.o \
  18. system.o isnt.o crypt.o crc.o rawread.o encname.o \
  19. resource.o match.o timefn.o rdwrfn.o consio.o options.o \
  20. ulinks.o errhnd.o rarvm.o rijndael.o getbits.o sha1.o \
  21. extinfo.o extract.o volume.o list.o find.o unpack.o cmddata.o
  22. .cpp.o:
  23. $(COMPILE) -D$(WHAT) -c $<
  24. all: unrar
  25. unrar: WHAT=UNRAR
  26. unrar: $(OBJECTS) $(UNRAR_OBJ)
  27. $(LINK) -Wl,-s -o unrar.exe $(LDFLAGS) $(OBJECTS) $(UNRAR_OBJ) $(LIBS)
  28. exe2coff unrar.exe
  29. cp -u $(DJDIR)/bin/cwsdstub.exe .
  30. copy /b cwsdstub.exe+unrar unrar.exe
  31. -upx --ultra-brute unrar.exe
  32. sfx: WHAT=SFX_MODULE
  33. sfx: $(OBJECTS)
  34. $(LINK) -Wl,-s -o default.sfx $(LDFLAGS) $(OBJECTS) -DSFX_MODULE
  35. clean:
  36. $(RM) $(OBJECTS) $(UNRAR_OBJ)
  37. veryclean: clean
  38. $(RM) unrar.exe default.sfx cwsdstub.exe unrar