blob: 9fe0ab7b600e584e8fe081408b582382c705cdb5 (
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
|
/*
our own rules to have a much cleaner compilation output
derived from Imake.rules
*/
#define RemoveFileQuiet(file) @$(RM) -f file \&>/dev/null
#define ObjectCompile(options) RemoveFileQuiet($@) @@\
ClearmakeOSName \
@echo \ \ CC $*.c @@\
@$(CC) -c $(CFLAGS) options $*.c || { echo \ \ CC failed: $(CC)·-c·$(CFLAGS)·options·$*.c; exit 1; }
#define RunPrintIfFailed(cmd) @cmd || { echo failed command: cmd; exit 1; }
#define NormalLibraryTarget(libname,objlist) @@\
AllTarget(LibraryTargetName(libname)) @@\
@@\
LibraryTargetName(libname): objlist $(EXTRALIBRARYDEPS) @@\
@echo \ \ Creating lib: $@ @@\
RemoveFileQuiet($@) @@\
RunPrintIfFailed(MakeLibrary($@,objlist)) @@\
RunPrintIfFailed(RanLibrary($@)) @@\
RunPrintIfFailed(_LinkBuildLibrary($@))
|