home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: SysTools / SysTools.zip / pmcron03.zip / makefile < prev    next >
Encoding:
Makefile  |  1996-05-09  |  3.8 KB  |  161 lines

  1. # Copyright (c) 1995 Florian Große-Coosmann, RCS section at the eof
  2. # this makefile is for GNU's make with gcc under OS/2, only
  3. #
  4. # set the default model, valid values are debug and release, it may be
  5. # overwritten by calling the targets debug and release
  6.  
  7. ifndef croncode
  8.   croncode=debug
  9. endif
  10.  
  11. .SUFFIXES: .dlg .rc .res .def .ico .h .ipf .hlp
  12. .PHONY: all debug release run rundet
  13.  
  14. # programs and flags for compiler and linker:
  15. CC=gcc
  16. LD=gcc
  17. CFLAGSALL=-Wall -I. -funsigned-char -m486
  18. LFLAGSALL=-lsocket
  19. # depending on the "debug"-value:
  20. DEBUGgcc=-g -DDEBUG -O0
  21. RELEASEgcc=-O6 -s
  22. DEBUGlink=-g
  23. RELEASElink=-O6 -s -lwrap
  24. MULTI=-Zmtd -Zomf -Zcrtdll
  25.  
  26. ifeq ($(strip $(croncode)),debug)
  27.   CFLAGS=$(CFLAGSALL) $(DEBUGgcc)
  28.   LFLAGS=$(LFLAGSALL) $(DEBUGlink)
  29.   OPATH=objd
  30. else
  31.   CFLAGS=$(CFLAGSALL) $(RELEASEgcc)
  32.   LFLAGS=$(LFLAGSALL) $(RELEASElink)
  33.   OPATH=obj
  34. endif
  35.  
  36. ###############################################################################
  37. # standard rules
  38.  
  39. $(OPATH)/%.o : %.c
  40.     $(CC) $(CFLAGS) $(MULTI) -c -o $@ $<
  41.  
  42. %:: RCS/%
  43.     +$(patsubst $@-noexist,co $< $@,$(filter-out $@,$(firstword $(wildcard $@) $@-noexist)))
  44. # note: this command has been stolen from the builtin command of GNU's make
  45. # to extract file of the pattern "RCS/%,v"
  46.  
  47. ##############################################################################
  48. # definition of the modules:
  49. MAIN=$(OPATH)/cronmain.o
  50. CDET=$(OPATH)/cron_det.o
  51. CPM=$(OPATH)/cron_pm.o
  52. SERV=$(OPATH)/server.o
  53. TABS=$(OPATH)/tables.o
  54. PROC=$(OPATH)/process.o
  55. TCPI=$(OPATH)/tcpip.o
  56. CTAB=$(OPATH)/crontab.o
  57.  
  58. all: crond.exe crontab.exe cronddeu.hlp crondeng.hlp crondfra.hlp
  59.  
  60. OBJS=$(MAIN) $(CDET) $(CPM) $(SERV) $(TABS) $(PROC) $(TCPI)
  61.  
  62. crond.exe: $(OBJS) crond.res crond.def
  63.     -kill crond
  64.     $(LD) $(MULTI) $(LFLAGS) -o $@ $^
  65.  
  66. crontab.exe: $(CTAB) crontab.res crontab.def
  67.     $(LD) $(LFLAGS) $(CTAB) -o $@ crontab.res crontab.def -lsocket
  68.  
  69. cronddeu.hlp: cronddeu.ipf
  70.     ipfc /W3 /LANGUAGE=DEU /COUNTRY=049 /CODEPAGE=850 $^
  71.     @-ren cronddeu.HLP cronddeu.hlp
  72.  
  73. crondeng.hlp: crondeng.ipf
  74.     ipfc /W3 /LANGUAGE=ENG /COUNTRY=001 /CODEPAGE=850 $^
  75.     @-ren crondeng.HLP crondeng.hlp
  76.  
  77. crondfra.hlp: crondfra.ipf
  78.     ipfc /W3 /LANGUAGE=FRA /COUNTRY=033 /CODEPAGE=850 $^
  79.     @-ren crondfra.HLP crondfra.hlp
  80.  
  81. server.h: common.h cron_id.h
  82.     touch $@
  83.  
  84. client.h: common.h
  85.     touch $@
  86.  
  87. $(MAIN): server.h
  88.  
  89. $(CDET): server.h
  90.  
  91. $(CPM): server.h
  92.  
  93. $(SERV): server.h
  94.  
  95. $(TABS): server.h
  96.  
  97. $(PROC): server.h
  98.  
  99. $(TCPI): server.h
  100.  
  101. $(CTAB): crontab.c client.h
  102.     $(CC) $(CFLAGS) -DTCPIP_SUPPORT -c -o $@ crontab.c
  103.  
  104. crond.res: crond.rc help.rc cron_id.h crond.dlg crond.ico
  105.     @-chcp 850
  106.     rc -r -i $(C_INCLUDE_PATH) -i . crond.rc
  107.     ren *.RES *.res
  108.  
  109. crontab.res: crontab.rc crontab.ico
  110.     rc -r -i $(C_INCLUDE_PATH) -i . crontab.rc
  111.     ren *.RES *.res
  112.  
  113. rundet: all
  114.     -del crond.out
  115.     start /N /FS crond
  116.  
  117. run: all
  118.     -del crond.out
  119.     start /N /PM crond.exe
  120.  
  121. debug:
  122.     +$(MAKE) "croncode=debug" all
  123.  
  124. release:
  125.     +$(MAKE) "croncode=release" all
  126.  
  127. # RCS depending informations
  128. #
  129. # $Id: makefile 1.7 1995/10/18 09:46:09 Florian Rel $
  130. #
  131. # $Name: Version121 $
  132. #
  133. # $Log: makefile $
  134. # Revision 1.7  1995/10/18 09:46:09  Florian
  135. # Country and codepage setting for compiling IPFs set.
  136. # Added support of the French language.
  137. #
  138. # Revision 1.6    1995/08/03 07:44:15  Florian
  139. # NLS supported (English and German)
  140. #
  141. # Revision 1.5    1995/03/30 17:01:28  Florian
  142. # .HLP renamed to .hlp, may cause an error on HPFS when using GNU make.
  143. #
  144. # Revision 1.4    1995/03/15 09:07:34  Florian
  145. # Some minor bugs fixed.
  146. # TCP/IP support added.
  147. #
  148. # Revision 1.3    1995/03/06 11:52:18  Florian
  149. # Many bugs fixed.
  150. # Fully supported online help.
  151. # Notebook layout revised.
  152. #
  153. # Revision 1.2    1995/02/20 12:53:23  Florian
  154. # All dialogs are placed into a notebook.
  155. # Some bugs fixed.
  156. #
  157. # Revision 1.1    1995/02/04 13:08:25  Florian
  158. # Initial revision
  159. #
  160. #
  161.