Skip to content
Snippets Groups Projects
Commit 76f4fd40 authored by 이장원's avatar 이장원
Browse files

8.7

parent 41ca31d2
No related branches found
No related tags found
No related merge requests found
CC=gcc
OBJS=main.o func.o
test: $(OBJS)
$(CC) -o $@ $^
id: main.o id_func.o
$(CC) -o test $(OBJS)
main.o: main.c
$(CC) -c main.c
func.o: func.c
$(CC) -c func.c
id_func.o: func.c
$(CC) -DPRINT_ID -c func.c
clean:
rm $(OBJS) test
#include <stdio.h>
#include "func.h"
int func_name_or_id()
{
#ifdef PRINT_ID
printf("201920756\n");
return 0;
#else
printf("Jangwon Lee\n");
return 1;
#endif
}
#pragma once
extern int func_name_or_id();
#include "func.h"
int main()
{
func_name_or_id();
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment