-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
52 lines (38 loc) · 790 Bytes
/
Makefile
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# Makefile for compkit
# Copyright (C) 1996-2005 Toyohashi University of Technology
SHELL = /bin/sh
# set PREFIX
# example:
# PREFIX = /home/ics-05/e050000
PREFIX = $(HOME)/p1
#
BINDIR = $(PREFIX)/bin
LIBDIR = $(PREFIX)/lib
INCDIR = $(PREFIX)/include
PERL = '/usr/bin/env perl'
CC = gcc
LIBS = -lics
OPTS = -O2 -Wall -I. -I$(INCDIR) -L$(LIBDIR) $(LIBS)
OBJS = main.o parse2.o
ASM = $(BINDIR)/asm
SR = $(BINDIR)/sr
target: compiler
compiler: $(OBJS)
$(CC) $(OBJS) -o compiler $(OPTS)
main.o: main.c
$(CC) main.c -c $(OPTS)
parse2.o: parse2.c
$(CC) parse2.c -c $(OPTS)
asm:
$(ASM) a.asm > a.out
sr:
$(SR) a.out
clean:
-rm -f *.o *~ compiler
git:
git add Makefile
git add *.sh
git add *.c
git add *.cpp
git commit -m "use Makefile auto commit"
git push origin master