aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/config/cf/nxcompile.def
blob: ff11b5962a8e35dea520545cef2dc97dd2da1de0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/*
  Rules to have a much cleaner compilation output

  derived from Imake.rules
*/

#define RemoveFileQuiet(file) @$(RM) -f file \&>/dev/null

#define RunPrintIfFailed(cmd)	@cmd || { echo failed command: cmd; exit 1; }

#define ObjectCompile(options) RemoveFileQuiet($@)			@@\
	ClearmakeOSName \
	@echo \ \ CC $*.c						@@\
	RunPrintIfFailed($(CC) -c $(CFLAGS) options $*.c)

#define NormalLibraryTarget(libname,objlist)				@@\
AllTarget(LibraryTargetName(libname))					@@\
									@@\
LibraryTargetName(libname): objlist $(EXTRALIBRARYDEPS)		@@\
	@echo \ \ CCLD $@						@@\
	RemoveFileQuiet($@)						@@\
	RunPrintIfFailed(MakeLibrary($@,objlist))			@@\
	RunPrintIfFailed(RanLibrary($@))				@@\
	RunPrintIfFailed(_LinkBuildLibrary($@))

#define	DependTarget()						@@\
DependDependency()							@@\
									@@\
depend::								@@\
	RunPrintIfFailed($(DEPEND) $(DEPENDFLAGS) -- $(ALLDEFINES) $(DEPEND_DEFINES) -- $(SRCS))