各种实验——test文件夹

hello.c

#include <stdio.h>
#include "myhead.h"

void main(){
    printf("******************************************************\n");
    printf(HELLO(!~)"\n");
    printf("******************************************************\n");
}

 

 

 

myhead.h

#include "myhead2.h"
#define HELLO(any) "hello, "W(any)

 

 

 

myhead2.h

#define W(something) "world"#something
int world = 5;

 

 

 

Makefile

include *.mk

 

 

 

dyyr.mk

dyyr:hello.o
    gcc -o dyyr hello.o
    ./dyyr
    
hello.o:hello.c myhead.h myhead2.h
    gcc -c hello.c myhead.h myhead2.h

clean:
    rm -f *.o *.gch

 

 

posted @ 2012-11-23 11:01  勒达与天鹅  阅读(263)  评论(0编辑  收藏  举报