suibenzhi
3/16/2020 - 5:20 AM

makefile

TARGET = lanchatcommon
INC=../../inc
LIB=../../lib
CC = gcc

OBJS= protocol.o

INCLUDES= -I$(INC)

%.o:%.c
	$(CC) -c $(INCLUDES) $(CFLAGS) $< -o $@

install:$(OBJS)
	$(CC) -fPIC -shared -o lib$(TARGET).so $(OBJS) -L$(LIB)
	cp lib$(TARGET).so $(LIB)

clean:
	-rm $(OBJS) ./*.so *.o $(LIB)/lib$(TARGET).so -f
TARGET = StudentSystemC++
BIN=../bin
LIB=../lib
INC=../inc
CC = g++
#CC = arm-linux-gcc
CFLAGS= -g -Wall 
LDFLAGS= 
INCLUDES=-I$(INC)
 
OBJS=./base/base.o ./base/base_vector.o ./operator/operator.o ./UI/UI.o \
	./student/student.o ./student/student_vector.o ./student/student_menu.o \
	./teacher/teacher.o ./teacher/teacher_vector.o ./teacher/teacher_menu.o \
	./admin/admin.o ./admin/admin_vector.o ./admin/admin_menu.o \
	main.o
 
all:$(TARGET)
 
%.o:%.cpp
	$(CC) -c $(INCLUDES) $(CFLAGS) $< -o $@
 
$(TARGET):$(OBJS)
	$(CC) -o $@ $^ $(LDFLAGS)
 
clean:
	-rm ./$(OBJS) $(TARGET) -f